Greetings all

I have a number of widths and lengths of fabrics, up to 20 pieces. The
widths and lengths can vary in size

The aim is use VBA to identify the least amount of fabric I need to
purchase but have the combinations fit within the width of the fabric
roll, this may vary but typically could be up to 3 metres wide.

Once the minimum total length is determined I need to multiply the
length by the price of the fabric.

An example of how the combination may look is shown below.

                        Width                   Length
Sample 1           800                  1,200
Sample2         1,200                   2,000
Sample3            500                   1,800
Sample4             800                     700
Sample5          2,500                     800
Sample6             450                     700

The dimensions are in mm.

In the above example I could select samples1, sample2, sample3 and
sample4 the total width being under 3,000mm.  The maximum length
required 2,000mm.

I would then need to select sample5 and 6. The widths fit within 3,000
mm. The maximum length required 800mm.

The total length needed for these samples would be 2,800 mm.


Any ideas how to use VBA to select the most efficient combinations
would be greatly appreciated.



Hugo Phong

-- 
----------------------------------------------------------------------------------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our Facebook Group @ http://www.facebook.com/group.php?gid=287779555678
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 6,800 subscribers worldwide and receive many nice notes about the 
learning and support from the group.Let friends and co-workers know they can 
subscribe to group at http://groups.google.com/group/excel-macros/subscribe

To unsubscribe, reply using "remove me" as the subject.

Reply via email to