At 16:58 25/03/2009 +0000, Eugénio Varejão wrote:
I have a template in calc that have an error but I don't know where it is and how can I correct it.

A B C D F E G H *POS* *Quant.* *Cod* *Marca* *Descrição* *PU* *Desc.* *PT* *01* 04 SICHCS03T SI Chassis Porsche 962 4,10 € 16,42 €

The formula under PT is "=IF(B7<>"";(F7*B7)-(F7*B7)*G7;"")" for this result should be 16.40 €.
Where is the error?

If your formula gives you a result different from what you are expecting, you need to explain not only what the formula is but also what it is meant to achieve. Otherwise, you just leave everyone guessing! If the formula itself defines what you are trying to do, then it simply *must* be correct.

There is a great deal of irrelevant detail here, and a lot of information missing - such as the formatting of various cells - but I'm guessing that it all boils down to "Why does 4 x 4.10 make 16.42 instead of 16.40?" Is that your question? If so, how did your 4.10 value get into its cell? If you typed it in just as it appears, then the value in that cell may genuinely be 4.10. But if it was calculated or pasted in from elsewhere, the value in the cell may simply be something which rounds to 4.10 when limited to two fractional places - as euro currency values would be. Something between 4.104 and 4.106, when formatted as euro currency, would display as 4.10 but would generate 16.42 when multiplied by 4.

If you want the value as you see it, rather than the underlying value in the cell, to be used in your calculations, go to Tools | Options... | OpenOffice.org Calc | Calculate, and tick "Precision as shown". But it may be better to ensure that the values in your data cells are actually what you need them to be.

I trust this helps.

Brian Barker


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to