ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Rounding to the nearest 25 including negative numbers?? (https://www.excelbanter.com/excel-discussion-misc-queries/230361-rounding-nearest-25-including-negative-numbers.html)

Bob

Rounding to the nearest 25 including negative numbers??
 
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!
--
Bob

JBeaucaire[_90_]

Rounding to the nearest 25 including negative numbers??
 
You need a little IF/THEN assistance:

=IF(Sheet4!BY60, CEILING(Sheet4!BY6,25), FLOOR(ABS(Sheet4!BY6),25)*-1)
--
"Actually, I *am* a rocket scientist." -- JB

Your feedback is appreciated, click YES if this post helped you.


"Bob" wrote:

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!
--
Bob


JBeaucaire[_90_]

Rounding to the nearest 25 including negative numbers??
 
By the way, your thread title says "nearest 25" but you're example used
CEILING, which always rounds UP. So my first answer was in the same vein.

But if you really want the numbers to round to the nearest 25, both up or
down, then use this:

=IF(G30,MROUND(G3,25),MROUND(ABS(G3),25)*-1)

--
"Actually, I *am* a rocket scientist." -- JB

Your feedback is appreciated, click YES if this post helped you.


"Bob" wrote:

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!
--
Bob


Ron Rosenfeld

Rounding to the nearest 25 including negative numbers??
 
On Sat, 9 May 2009 09:38:01 -0700, Bob wrote:

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!


=round(sheet4!BY6/25,0)*25
--ron


All times are GMT +1. The time now is 02:36 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com