Excell formula of VB to calculate number of pieces out of a given sheet size

UMAKEMESIK

Active Member
Joined
Oct 3, 2005
Messages
378
to all,
Thanks in Advance.

we work in plywood with 48 x 96" sheets or 4foot x 8 foot sheets ( same)

I am looking for a yeild formula would be best , some sort of if statement.

if it has to be VB then ok.

Starting with our standard 48 x 96 sheet.

I would like to in put 2 numbers into two cells a length cell and a width cell.

for example the part is 23 x 19 and i would like the calculation to tell me
how many i can get out of my desired sheet size of 48 x 96.

the 48 x 96 is standard, but it i could change that sheet size as well that would be great.

as we also deal in foam - which is 48 x 108


any help would be much appreciated.

thanks
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
UMAKEMESIK
Hi, I write this little code for you I hope is the help you are looking for, I am expecting you know how to copy the code into the IDE of VBA.

this is the excel sheet
1597104286596.png

that, is the places to type your data.
and this is the code
VBA Code:
Sub UMAKEMESIK()
Dim LP%, WP%, FL%, WF%, X%, Y%

'///////// PLAYWOOD ////////////////
LP = Range("C4").Value
WP = Range("D4").Value
X = LP * WP
Range("F4").Value = 4608 / X

'//////// FOAM///////////////////////////////

FL = Range("C8").Value
WF = Range("D8").Value
Y = FL * WF
Range("F8").Value = Y
End Sub
now you can input your values for the playwood on C4 and D4, and for the foam on C8 and D8 just click play on the IDE or create a buttom.
have a nice day
 
Upvote 0
sorry on range("f8").value = y
must be
range("F8").value = 5184/Y
then will work perfect
 
Upvote 0

Forum statistics

Threads
1,214,642
Messages
6,120,701
Members
448,980
Latest member
CarlosWin

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