Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Cross-posted:
- microsoft.public.excel.programming - microsoft.public.excel.worksheet.functions Hello all, I'm looking for an XL solution and/or a VBA solution...and I just can't wrap my head around this. I have a list of 162 numbers (loan amounts: min = $0, max = $3,107,000). I want to find the sum of every single combination of the 162 numbers...from one single number up to all 162 numbers. If my calculations are correct, that is 26,244 different sums. For VBA, I'm guessing I'm gonna need 2 for loops...one nested inside the other. But I can't figure out the code to sum up all the different combinations. Something like this: For plngIndexX = LBound(pdblArray) To UBound(pdblArray) For plngIndexY = LBound(pdblArray) To UBound(pdblArray) 'code to calculate all the differnt combinations Next plngIndexY Next plngIndexX In XL, trying to think like a computer...I'm gonna need 162 bits(cells) to calculate. But instead of each bit having a progressive value of a power of 2, each bit will be one of the numbers in my list. I was thinking of using the list of numbers as column headers across the top, have a sumproduct formula in column 163/164 that will sum up the column headers according to the bits being on or off, and then have 26,000+ rows of bits marked on or off. The problem would be filling out those 26,000 rows with 1's & 0's. Anyone know of formulas or code that I could use to mark my bits on or off? If it would be easier/faster in MS Access/SQL Server, I'm all ears. Thanks for any help anyone can provide, Conan Kelly --------------------------- "Smokin' weed kills your brain cells. Drinkin' only screws up your liver...ya got 2 a those." - Earl Hickey (NBC's "My Name is Earl") If Milli Vanilli falls in the woods, does someone else make a sound? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
XL 2003: How do I get every possible combination? | Excel Worksheet Functions | |||
Excel 2003 - Combination chart: Stacked Column + Stacked Column | Charts and Charting in Excel | |||
Combination Sum | Excel Worksheet Functions | |||
How do I make a combination chart in 2007 as in 2003? | Charts and Charting in Excel | |||
combination | Excel Discussion (Misc queries) |