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

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
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
Thanks West Man!

My boss now thinks I am a genious. Let's not tell him anything different OK? ;)
 
Upvote 0

Forum statistics

Threads
1,214,593
Messages
6,120,435
Members
448,962
Latest member
Fenes

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