View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bernie Deitrick Bernie Deitrick is offline
external usenet poster
 
Posts: 5,441
Default A tricky macro -

Ctech,

There is code available that could be used to solve this, but how well it would work depends on how
many debits and credits you have. If you have other identifying data to narrow down which credits
can be applied to which debits, that would help to reduce the size of the problem.

Also, you would be amazed at the number of combinations that can be used to make up a specific
number from a fairly small data set, so it is unlikely that you will be able to find unique
solutions anyway. A recent post had a list of 24 numbers, and four combinations added up the
specific number the OP had in mind.....

HTH,
Bernie
MS Excel MVP


"Ctech" wrote in message
...

Hi guys


I do believe I will need help by real experts on this one.


Im going through reports to find if there is any credits(Column A) and
debits(Column B) which counter eachother off.

i.e. Credit of 1000 will counter off a Debit of 1000

However the tricky part is that, several Credits can counter off a
Debit or the other way around.

i.e Credit of 200 + a credit of 300 + a credit of 500 = 1000
can counter off a debit of 1000

When the macro finds a match, I want it to copy the rows and past them
in order in another sheet. Take the example above as an example, there
will be 3 rows (credit) and 1 row from(debit).

Then delete these in ActiveSheet.



Is this possible.. ?


--
Ctech
------------------------------------------------------------------------
Ctech's Profile: http://www.excelforum.com/member.php...o&userid=27745
View this thread: http://www.excelforum.com/showthread...hreadid=501125