Bored at work? Make some nuz...
DigDB      Excel Add-ins      Add-in Tools for Excel Elites
Who else wants to do a 10-hour Excel analysis in 15 minutes? (more ...)

Features | Testimonial | Download free 15-day trial | Purchase | FAQ | Contact | Forum

rounding to nearest odd or even -- can DigDB help?

View: New views
3 Messages — Rating Filter:   Alert me  

rounding to nearest odd or even -- can DigDB help?

by krelmer :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello

I am trying to figure out how to round to the nearest odd or even number. I am wondering if DigDB can do this?

Here's my problem:
I would like to ROUND to the nearest either odd or even integer, as I specify. In Excel, one can ROUNDUP to the nearest odd or even, but that is not what I want to do. I want to ROUND (not always *up*, sometimes *down*!).
For example, when asking to 'round to odd', I want:
161.8 to round to 161
162.2 to round to 163
155.8 to round to 155
148.7 to round to 149
etc etc etc.
Same thing when I specify 'round to even', I want:
161.8 to round to 162
162.2 to round to 162
155.8 to round to 156
148.7 to round to 148

As far as I can tell, Excel will only ROUNDUP to nearest odd or even. It is not clear to me if DigDB will help in allowing me to be more specific. I have many thousands of numbers to round to the nearest odd or even, so any ideas to help would be much appreciated!

thanks

Kathryn

Re: rounding to nearest odd or even -- can DigDB help?

by DigDB Support :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Sorry, but no. DigDB cannot do that. My suggestion will be to use VBA to do some custom programming. But there is a learning curve.

Re: rounding to nearest odd or even -- can DigDB help?

by retroroco :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

sometimes you  don't need add-on programs or even VBA. Try these two formulae:

Odd =IF(A2=0,"",(ODD((ROUNDDOWN(A2/2,0)*2))))

Even =IF(A2=0,"",(EVEN((ROUND(A2/2,0)*2))))


The IF test was just added to blank the cell if the source cell is "0" zero.
LightInTheBox - Buy quality products at wholesale price


Features | Testimonial | Download | Purchase | FAQ | License | Contact | Forum (powered by Nabble's free forum)

Copyright © 2006 All rights reserved

DigDB      Excel Add-ins      Add-in Tools for Excel Elites
Who else wants to do a 10-hour Excel analysis in 15 minutes?

Related keywords: Advanced excel tips, excel questions tools, Excel reporting applications, Excel add-ins add-in, Excel shareware, Excel plugin plug-ins plugins, Excel tricks question, Excel utility utilities, Excel add-on add-ons, Excel tip tips, Power excel technique, Excel manipluation, Excel guru, Excel trick, Excel toolkit, Excel app power user

Microsoft Office Marketplace logo
Microsoft and the Office logo are trademarks or registered trademarks of
Microsoft Corporation in the United States and/or other countries.