Results 1 to 2 of 2
2008-06-06, 19:43 #1
- Join Date
- Dec 2001
- Atlanta, Georgia, USA
- Thanked 0 Times in 0 Posts
Excel 2003 question (Excel 2003/sp3)
Let's say I have an Excel spreadsheet with a column full of different numbers. So each cell has a different random number in it. The numbers represent a file size in kilobytes. Let's also say there are a few hundred cells in this column all with different values. Is there a way to easily put groupings of these cells together through a formula or something so that they add up to no more than 3 gigs but not much less than that, either? So if I have 100 cells, all with different values, what I want to do is run some command that will tell me that "these cells" added together would come out to no more than 3 gigs. I hope that makes sense.
2008-06-06, 21:50 #2
- Join Date
- Mar 2002
- Thanked 29 Times in 29 Posts
Re: Excel 2003 question (Excel 2003/sp3)
You can use the Solver add-in for this. If your Tools menu doesn't contain a Solver item, use Tools | Add-Ins to install the Solver.
In the attached sample workbook, column A contains a series of numbers, and column B contains 0s and 1s - 0 means don't include the number in column A and 1 means do include. The Solver add-in has been used to populate column B in such a way that the sum of the included numbers (in cell E2) is maximized while meeting the following conditions:
1) The numbers in column B are greater than or equal to 0.
2) The numbers in column B are less than or equal to 1.
3) The numbers in column B are whole numbers.
4) The sum of the included numbers (in cell E2) is less than or equal to the target number (in cell E1).