How to ROUNDUP an IF Formula

wberg82

New Member
Joined
Feb 19, 2016
Messages
38
=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

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
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:
Upvote 0

Forum statistics

Threads
1,214,599
Messages
6,120,447
Members
448,966
Latest member
DannyC96

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top