View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions,microsoft.public.excel.newusers,microsoft.public.excel
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default 1. Is it possible to do this excel?

=IF(RIGHT(A3,1)=0,A3,FLOOR(A3,0.05))

Excel will never calculate a result of 219.40. It will calculate 219.4. The
only way to get the terminating 0 is to use formatting and formatting is for
display purposes only.

Using that formula the only time RIGHT(A3,1)=0 will be TRUE is if you first
correct it to read:

RIGHT(A3,1)="0"

If 219.40 is being rounded down to 219.35 then 219.40 is not the true
underlying value of the cell. It might be something like 219.399999999999
but, due to formatting, is displaying as 219.40.

So, the result of the formula, =FLOOR(G1,0.05) = 219.35, is correct.

--
Biff
Microsoft Excel MVP


"Eduardo" wrote in message
...
Hi,

=IF(RIGHT(A3,1)=0,A3,FLOOR(A3,0.05))


"san" wrote:

Hi,

Thanks so much for such a quick reply. I tried your function
=FLOOR(G1,0.05) on my worksheet, but on few cells it gave me result
like
this

219.40---219.35 which should remain 219.40
219.55---219.50 which should remain 219.55

I wonder why it happened. Please help me on this too. Thanks.

San


"san" wrote in message
.. .
Hi friends, i have a small query if you got little time. i have many
numbers in an excel worksheet and i want to round them up only for
decimal
places and that too like this way.
219.39---219.35
219.32---219.30
219.34---219.30
219.37---219.35

I mean decimal places must end in .05, .10, .15, .20, .25, .30, so on.
what is the function for this result. thanks in advance.