Rounding to the nearest 25 including negative numbers??

B

Bob

I have the following formula
=CEILING(Sheet4!BY6, 25)
How I get it to round negative numbers too

It works with positive numbers but when I insert ie -360, it should read
-350 but I get the following #NUM!
 
J

Jacob Skaria

=IF(Sheet4!BY6<0,-CEILING(ABS(Sheet4!BY6),25),CEILING(Sheet4!BY6,25))

There may be a different solution

If this post helps click Yes
 
B

Bob

Fantastic it works
Many thanks

--
Bob


Jacob Skaria said:
=IF(Sheet4!BY6<0,-CEILING(ABS(Sheet4!BY6),25),CEILING(Sheet4!BY6,25))

There may be a different solution

If this post helps click Yes
 
J

Jacob Skaria

Refer help on CEILING

It is supposed to return number rounded up, away from zero.
=CEILING(-2.5, 2)
Returns an error, because -2.5 and 2 have different signs (#NUM!)

You should be using
=CEILING(Sheet4!BY6, -25)

If this post helps click Yes
 

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