How to ROUNDUP an IF Formula

wberg82

New Member
=IF(B5=0.375,(C5*D5)+E5+(IF(B5=0.375,F5*0.057))+(IF(B5=0.375,G5*0.094))+(IF(H5="X",0.328125,0))+(IF(I5="X",0.453125,0)),0)

How do I get this formula to ROUNDUP to the nearest 0.25?

Thanks

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"

joeu2004

Well-known Member
Ostensibly:

Rich (BB code):
``=IF(B5=0.375,CEILING((C5*D5)+E5+(IF(B5=0.375,F5*0.057))+(IF(B5=0.375,G5*0.094))+(IF(H5="X",0.328125,0))+(IF(I5="X",0.453125,0)), 0.25),0)``

But your formula can be greatly simplified, to wit:

Rich (BB code):
``=IF(B5=0.375, CEILING(C5*D5 + E5 + F5*0.057 + G5*0.094 + IF(H5="X",0.328125) + IF(I5="X",0.453125), 0.25), 0)``

If is not necessary to test B5=0.375 multiple times, unless you made a mistake in your original logic.

Removing the redundant parentheses improves readability.

Last edited:

Replies
3
Views
272
Replies
0
Views
53
Replies
6
Views
58
Replies
4
Views
113
Replies
6
Views
52