Need help with formula for rounding up

wvarner

New Member
Joined
Jun 6, 2011
Messages
9
Cell F17 contains a fixed number (pieces per case pack). My customer will input a number (pieces needed) in cell G17. I need a formula that will round cell G17 up to the nearest case pack (number in cell F17).
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Welcome to the Board...

There will no doubt be a shorter way, but this should do what you want:

=IF(MOD(G17,F17)=0,G17,G17-MOD(G17,F17)+F17)

Matty
 
Upvote 0
One more thing please....I want to hide the #VALUE1 that I get when there is no Data in it. Is that possible?:biggrin:
 
Upvote 0
=IF(or(G17="",F17=""),"",CEILING(G17,F17)) will take care of either F17 or G17 being empty.
 
Upvote 0

Forum statistics

Threads
1,224,587
Messages
6,179,740
Members
452,940
Latest member
Lawrenceiow

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