Conditional rounding?

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
 
J

Jason Morin

=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
 
M

memnoch

Dan said:
*Memnoch,

You can use an addition to offset the formula:

=ROUND(A1+0.3,0)

Dan E
*
[/QUOTE]

You da man! I knew it had to be something simple :p Thank
 

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