Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I would like to calculate how many books of various
dimensions (only Length and Width - not Depth) will fit onto a given floor plan of a box. So the input is two dimensions - Length and Width. The ouput is the number of books that will fit on the floor plan with no overlaping. does anyone know how to go about starting this? Many Thanks, Simon |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Simon
Try this Function BooksInBox(L As Long, W As Long) As Long Dim BoxL As Long 'always =BoxW Dim BoxW As Long 'always <=BoxL Dim NumBooks As Long, NumBooks2 As Long Dim RemBox As Long BoxL = 50 BoxW = 40 'Test lenghtwise NumBooks = (BoxL \ L) * (BoxW \ W) RemBox = BoxL - ((BoxL \ L) * L) NumBooks = NumBooks + ((RemBox \ W) * (BoxW \ L)) 'Test widthwise NumBooks2 = (BoxL \ W) * (BoxW \ L) RemBox = BoxL - ((BoxL \ W) * W) NumBooks2 = NumBooks2 + ((RemBox \ L) * (BoxW \ L)) BooksInBox = Application.Max(NumBooks, NumBooks2) End Function -- Dick Kusleika MVP - Excel www.dicks-clicks.com Post all replies to the newsgroup. "Simon" wrote in message ... I would like to calculate how many books of various dimensions (only Length and Width - not Depth) will fit onto a given floor plan of a box. So the input is two dimensions - Length and Width. The ouput is the number of books that will fit on the floor plan with no overlaping. does anyone know how to go about starting this? Many Thanks, Simon |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
draw a floor plan sketch with measurments. | Charts and Charting in Excel | |||
draw a floor plan to scale in excel | Excel Worksheet Functions | |||
How do I use a block diagram to draw a floor plan in Excel? | Excel Discussion (Misc queries) | |||
How do I link an Excel Data Base to a Visio Floor Plan? | Excel Discussion (Misc queries) | |||
Free floor plan design software | Excel Discussion (Misc queries) |