View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
GS[_2_] GS[_2_] is offline
external usenet poster
 
Posts: 3,514
Default Calculate quantity of shapes inside another shape

jlclyde presented the following explanation :
Hello,
I have been working on a formula that will calculate how many
rectangles will fit inside another rectangle. I am stuck. For
instance I have a rectange that is 29.125" X 36.125" and I need to
determine how many 4.875" X 7" rectangles I can fit inside to optomize
the original rectangle. Any help woudl be greatly appreciated.

Thanks,
Jay


It will depend on how you orient the smaller shapes. For example, if
you put the 4.875" (width) along the 29.125" (width) you can get 5.974
pieces by 5.161 pieces for a total of 25 with lots of left over space.
If you transvers the pieces so they're oriented length along width of
large rectangle, you'll get 28 pieces with little leftover space.

So with the following layout:

A1: 29.125
B1: 36.125
A2: 4.875
B2: 7
C1: =ROUNDDOWN(($A$1/$A$2),0)*ROUNDDOWN(($B$1/$B$2),0) (width/width)
C2: =ROUNDDOWN(($A$1/$B$2),0)*ROUNDDOWN(($B$1/$A$2),0)
(length/width)

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc