Conditional rounding?

  • Thread starter Thread starter memnoch
  • Start date Start date
M

memnoch

Excel's ROUND functions round up from .5, what's the easiest way to mak
it round up from .2?

ex.
Default: 2.49 = 2, 2.5 = 3
I want: 2.19 = 2, 2.2 = 3

I've written a macro that can do it, but I'd really rather no have t
import code into each workbook I need to do this with.

Any help would be greatly appreciated. Thanks
 
=INT(A1)+MOD(A1,1)>=0.2

Credit to MVP Harald Staff for this one.

For some reason, the formula returns a boolean which it
shouldn't. I thought boolean + value = value. So I had to
use:

=INT(A1)+(MOD(A1,1)>=0.2)*1

to return a numerical value. It must be setting in XL2002
that I'm missing.

HTH
Jason
Atlanta, GA
 
Back
Top