MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Rounding Up?


Posted by Travis on August 17, 2001 11:51 AM

I want to round up a variable to the next 5000.

Example: If my variable = 22000, I want to round it
up to 25000.

Any suggestions?


Posted by RT on August 17, 2001 12:02 PM

--------->>Try =ROUNDUP(A1/5000,0)*5000---------

Posted by IML on August 17, 2001 12:04 PM

You could try
=CEILING(A1/1000,5)*1000
assuming your number is in A1. I'm not real sure how to address negative numbers though?

Posted by IML on August 17, 2001 12:13 PM

How about,
=IF(A1>=0,CEILING(A1/1000,5)*1000,FLOOR(A1/1000,-5)*1000)
if negatives are an issue. I never realized roundup always goes away from zero?

Posted by Mark W. on August 17, 2001 12:25 PM

=CEILING(A1,5000*IF(A1<0,-1,1)) where A1 contains
your value. I want to round up a variable to the next 5000.

Posted by IML on August 17, 2001 1:14 PM

Negative attitude?

Wouldn't you expect -2000 rounded up to nearest 5000 to go to zero though?
My brain is hurting me more than usual today, so I could be way off. Does running up mean away from zero or a greater number? =CEILING(A1,5000*IF(A1<0,-1,1)) where A1 contains

Posted by Mark W. on August 17, 2001 2:08 PM

Re: Negative attitude?

I don't know if negative numbers are in his domain.
Perhaps he wants to round up the magnitude of the
value. I just thought I'd toss this into the mix.