View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
bj bj is offline
external usenet poster
 
Posts: 1,397
Default calculate various cells to acheive a specific value

for two only
in B1 enter
=if(isnumber(match(10525-A1,A:A,0)),10525-A1),"")
copy and paste down
or you could use the match portion in if true to find where it is.

for three, You can set up an NxN table and do something similar
for 4 or more it can get very unwieldy.

I wrote a macro to this one time, and when it didn't solve quickly, I
calculated how long it would take to solve and came up with about a hundred
years of computer time.


"Jennifer_C" wrote:

Hello,
I am trying to identify two cells within a column that total a specific
amount. For example:

ColA
546
9732
654
6548
687
9871

I need to find the two (or more cells in some cases) that would create the
total of 10,525.

For my current task, I have over 100 rows of data and I know two cells equal
a specific amount, but I do not know which two. Any help, or assistance given
would be greatly appreciated!

Jennifer