Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Calculate No. of Objects on Floor Plan

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 179
Default Calculate No. of Objects on Floor Plan

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
draw a floor plan sketch with measurments. About display names Charts and Charting in Excel 2 December 28th 07 05:22 PM
draw a floor plan to scale in excel MRPEDE Excel Worksheet Functions 5 March 31st 07 03:30 AM
How do I use a block diagram to draw a floor plan in Excel? knightlady00 Excel Discussion (Misc queries) 2 June 18th 06 05:59 PM
How do I link an Excel Data Base to a Visio Floor Plan? DamienStarr Excel Discussion (Misc queries) 1 April 14th 06 03:56 PM
Free floor plan design software maverick Excel Discussion (Misc queries) 0 January 4th 06 05:35 AM


All times are GMT +1. The time now is 10:11 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"