Sub CalculateLaodQty()
Dim PalletWidth As Double
Dim PalletLength As Double
Dim PalletHeight As Double
Dim PalletWeight As Double
Dim CartonWidth As Double
Dim CartonLength As Double
Dim CartonHeight As Double
Dim CartonWeight As Double
Dim WidthQty As Double
Dim LengthQty As Double
Dim LengthToLengthLayerQty As Integer
Dim LengthToWidthLayerQty As Integer
Dim AlternateDirection As Boolean
Dim Basketweave As Double
Dim HalfBasketweave As Double
Dim Herringbone As Double
Dim JackOnJack As Double
Dim Length_RowWidthQty As Double
Dim Length_RowLengthQty As Double
Dim Width_RowWidthQty As Double
Dim Width_RowLengthQty As Double
PalletWidth = Range("C2")
PalletLength = Range("C3")
PalletHeight = Range("C4")
PalletWeight = Range("C5")
CartonWidth = Range("C7")
CartonLength = Range("C8")
CartonHeight = Range("C9")
CartonWeight = Range("C10")
Length_RowWidthQty = Application.WorksheetFunction.RoundDown(PalletWidth / CartonLength, 0)
Length_RowLengthQty = Application.WorksheetFunction.RoundDown(PalletLength / CartonLength, 0)
Width_RowWidthQty = Application.WorksheetFunction.RoundDown(PalletWidth / CartonWidth, 0)
Width_RowLengthQty = Application.WorksheetFunction.RoundDown(PalletLength / CartonWidth, 0)
LengthToLengthLayerQty = Length_RowLengthQty * Width_RowWidthQty
LengthToWidthLayerQty = Length_RowWidthQty * Width_RowLengthQty
MsgBox "Layer Laid Length to Length QTY " & LengthToLengthLayerQty & vbLf & _
"Layer Laid Length to Width Qty " & LengthToWidthLayerQty
End Sub