Find cells that summed up, equal a given value

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Please help me. I have looked every where but I couldn't find it. I would like to find all the cells that if you sum up them, they equal or approximately equal a given value. Per example if I write 3 and there is 1,25 in cell B4 and 1,75 in cell M45, I would like excel to give me those cells (B4-M45)
Is it possible

I will really appreciate your help. Thanks in advance.
 
Hi
if you have many cells (lets say about 100-200) this is NOT feasible
due to calculation time. Especially if you add an 'approximate'
condition to this algorithmn.

There're just too many possible combinations to check
 
Hi
provide some details about your spreadsheet:
- where're your values stored
- what do you exactly trying to achieve

--
Regards
Frank Kabel
Frankfurt, Germany

Ruzgar said:
And if I do not have too many values, how can I do it? Thanks in
advance
 
Hi
if I remeber my math lessons correctly this would require to check
2^30-1 different combinations using a brute force algorithmn

if you could check 100 combinations per second this would require
approx. 4 months if you want all possible combinations which add up to
your sum


--
Regards
Frank Kabel
Frankfurt, Germany

Ruzgar said:
Dear Frank Kabel,

Let say that my values are stored in A1 to A30.
I am trying to find the invoices that are concerned by a total
amount. Lets say that we have $5000, $2500, $150. I would like to know
which cells (invoices) have a sum equal to my total amount. Let say
$7500: It will be the first and the second cell. Of course it will have
more than 3 values, and that's why I cannot find it manually.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top