1. Is it possible to do this excel?

S

san

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.
 
S

san

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
 
E

Eduardo

Hi,

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


san said:
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
 
T

T. Valko

=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.
 
T

T. Valko

In addition:
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"

And, will only be TRUE when the number is an integer in a multiple of 10.
 
S

san

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.



Thanks, I finally understood it. The cell 219.198 was shown as 219.20.
Thats why it when I used =FLOOR(G1,0.05) it showed me 219.15 which is
correct.

Thanks so much again.

San
 
M

Modeste

Bonsour® san avec ferveur ;o))) vous nous disiez :
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

Rounding to the nearest 0.05 :
=0.05 * (INT((A1+ 0.025 ) / 0.05 ))

HTH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top