Rounding to a quantity divisible by another listed quantity

DSEIDEN76

New Member
Joined
Oct 8, 2018
Messages
11
I'm having a math/excel problem. I have a sheet of values. In column A I have package quantities, column B a value that our system says to order. In column C I'd like to produce a value that is the nearest divisible number to what shows in column A.

A B C
PACKAGE SYS ORDER
50 20 (NEED FORMULA FOR THIS TO = 50)
40 60 (THIS WOULD NEED TO = 80)
35 40 (THIS WOULD NEED TO = 35)

The sheet will have a variable amounts of rows so i'll need to copy that to the last row as well.
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Up until the 35,40 >> 35 example, I though that you were rounding up.
If you are rounding either direction, wouldn't the 50,20 desired result be 0?
 
Upvote 0
Good point. I think the majority of the time I'll want to round up since we're ordering product and don't want to run out, but if we're slighting above the package quantity needed we'd want to round down. I guess a round up formula would be okay and then we could manually look at it from there.
 
Upvote 0
Maybe...


A
B
C
1
PACKAGE​
SYS​
ORDER​
2
50​
20​
50​
3
40​
60​
80​
4
35​
40​
35​

Formula in C2 copied down
=IF(CEILING(B2,A2)-B2>ABS(B2-A2),FLOOR(B2,A2),CEILING(B2,A2))

M.
 
Upvote 0

Forum statistics

Threads
1,214,861
Messages
6,121,971
Members
449,059
Latest member
oculus

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