Rounding function for optimization

wberg82

New Member
Joined
Feb 19, 2016
Messages
38
I am trying to write a formula that rounds up (or down) to the nearest whole number. Here are my parameters. This is for optimizing material lengths in manufacturing.....

Cell P40 = number of stock lengths required
Cell D22 = Quantity of Pcs
Cell J6 = Length of Each Pc.
Cell I40 = Length of stock material

P40=IFERROR((D22/(ROUNDDOWN((I40/J6),0))),"") This is my current formula. The issue is, if my length (J6) is longer than my length to stock material (I40), the formula returns blank.

How do I make the formula recognize that if my length of each pc is longer than my stock material that I will need additional stock material to make up that length?

For example: I have 2 pcs of material at 60' each. My stock length material is 24'. Therefore, I would need 5 pcs of stock length material.
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
[Table="width:, class:grid"][tr][td="bgcolor:#C0C0C0"][/td][td="bgcolor:#C0C0C0"]
A​
[/td][td="bgcolor:#C0C0C0"]
B​
[/td][td="bgcolor:#C0C0C0"]
C​
[/td][td="bgcolor:#C0C0C0"]
D​
[/td][td="bgcolor:#C0C0C0"]
E​
[/td][/tr][tr][td="bgcolor:#C0C0C0"]
1​
[/td][td="bgcolor:#F3F3F3"]
Stock Len
[/td][td="bgcolor:#F3F3F3"]
Fab Len
[/td][td="bgcolor:#F3F3F3"]
Fab Qty
[/td][td="bgcolor:#F3F3F3"]
Stock Qty
[/td][td="bgcolor:#F3F3F3"]
[/td][/tr]
[tr][td="bgcolor:#C0C0C0"]
2​
[/td][td]
24​
[/td][td]
60​
[/td][td]
2​
[/td][td="bgcolor:#CCFFCC"]
5​
[/td][td="bgcolor:#CCFFCC"]D2: =CEILING(C2*B2/A2, 1)[/td][/tr]
[/table]
 
Upvote 0
The above formula works, but it is still missing something that I need it to take into account. Here is my issue.

Stock Len: 24
Fab Len: 13
Fab Qty: 2
Stock Qty: 5

E2 = 6

This would be incorrect. If I am using 24' material, I can only get (1) 13' pc from that material. Therefore I would need (10) pcs of stock length - or E2=10.
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,157
Members
453,021
Latest member
Justyna P

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