LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Number Combination

Hi

This is going to be horribly mathematically intensive to do but I'm hoping
someone will know how to do it - I'm very happy with VBA but can't quite get
my head round this one....

I've got list of up to 120 numbers in column A. These numbers are dollar
values and may be positive or negative.

Some combination(s) (when summed) of UP TO 10 cells will equal the number
that I'm looking for. How do I find all the combinations that match the
number I'm looking for?

Here's a much simplified version:

A1 = 10
A2 = 20
A3 = 30
A4 = 40
A5 = 50
A6 = -20

If the total I'm looking for is 50, it needs to return the cell addresses
(or their values)

A1 + A4 (10+40)
A2 + A3 (20+30)
A3+A4+A6 (30+40-20)
A5 (50) and so on and on and on......

It doesn't matter (almost) how long it takes to run - just being able to get
the answer is the really important thing.

Any bright ideas?

Many thanks

David


 
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
Number/Text combination formula donnae Excel Discussion (Misc queries) 8 July 30th 09 08:15 PM
Number generator and combination Jessshin Excel Discussion (Misc queries) 1 October 19th 07 04:26 PM
How do I sort different combination of a 4 digits number didi Excel Discussion (Misc queries) 4 March 23rd 07 08:27 PM
combination of six digit number from 0 to 49 Divya Excel Worksheet Functions 1 February 26th 07 07:16 AM
Number Combination finder GMD Excel Worksheet Functions 2 September 8th 06 05:14 PM


All times are GMT +1. The time now is 10:23 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"