Tired of beating my head against the formula bar

Cubicle_51

New Member
Joined
Dec 14, 2004
Messages
15
I know a simple answer is staring me in the face I just can't see it....so after searching unsuccessfully across the boards I come asking for help...

We use 8ft sections of tubing to make structures in our warehouse (conveyors, racks and such)

Example: I need 9 pieces cut at 45.5 inches, I know I can get two 45.5 cuts out of one 8ft tube,

How do I get excel to start over at 96 inches (8ft) if the remainder of tube is less than length of cut needed?

Basically, how can I get excel to tell me how many pieces of 8ft tube I need to use if I have to cut (a variable amount) of pieces at a (variable length)
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
How about
+Fluff 1.xlsm
HIJ
2QtyLengthRequired
3946.55
Main
Cell Formulas
RangeFormula
J3J3=ROUNDUP(H3*I3/96,0)
 
Upvote 0
How about
+Fluff 1.xlsm
HIJ
2QtyLengthRequired
3946.55
Main
Cell Formulas
RangeFormula
J3J3=ROUNDUP(H3*I3/96,0)
Fluff,

I was thinking along the same lines, but I don't think that will always work.
For example, take the current example and change the needed length to 40.
The answer the formula returns is 4, but that will not work, because you cannot cut more than 2 40 inch pieces out of any 96 inch piece.
So you still actually need 5 pieces, not 4.

So I don't think we can take it "in total" like that.

I am not sure if the best way is to try to create a UDF in VBA, or some formula that is a bit more complex (not sure exactly what that would look like).
 
Upvote 0
Good point Joe, how about this instead
+Fluff 1.xlsm
HIJ
2QtyLengthRequired
39405
Main
Cell Formulas
RangeFormula
J3J3=ROUNDUP(H3/INT(96/I3),0)
 
Upvote 0
Solution
Good point Joe, how about this instead
+Fluff 1.xlsm
HIJ
2QtyLengthRequired
39405
Main
Cell Formulas
RangeFormula
J3J3=ROUNDUP(H3/INT(96/I3),0)
That wasn't nearly as complex as I thought!
It makes perfect sense. Don't know why I didn't think of that!
 
Upvote 0
I should have thought of that before. :(
 
Upvote 0
see I went round and round and never considered INT.

that's absolutely amazing

Thank you both very much!!
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,018
Messages
6,122,703
Members
449,093
Latest member
Mnur

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