Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MS Excel 2003 - Rounding up and down (nested IF) 1

Status
Not open for further replies.

spartansFC

Programmer
Apr 1, 2009
165
GB
Hi

I need to create a nested IF statement i think that rounds up or down to the nearest .5 based on certain criteria.

0-0.2499 round down to the nearest day
.25-.4999 round up to nearest half day
.5-.7499 round down to nearest half day
.75-.9999 round up to nearest day

for example

6.23 = 6 days
6.42 = 6.5 days
6.71 = 6.5 days
6.76 = 7 days

i did have

Code:
=IF(A1<0.23,ROUNDDOWN(A1,0.5),IF(A1<0.5,ROUNDUP(A1,0.5),ROUNDDOWN(A1,0)))

but the above doesn't seem to work properly. Anyone have any ideas

thanks

Mikie
 
What about the CEELING function?
Code:
=CEILING(A1,0.25)

combo
 
Sorry, proper function name (as in the box): CEILING.

combo
 
thanks to everyone for you replies, i got it working by using lionelhill's method

Code:
=ROUND(J11*2,0)/2

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top