How to match debit and credit line item

  • Thread starter Ponnambalam Sugumar
  • Start date
P

Ponnambalam Sugumar

Dear sir / Mam

I need help form you how to matching debit an credit line itmes with help of macro we have thousand line items for example below. Once the line item will matched those line item will come in a seperate sheet pls help me in this regards
Number Type Document Amount Profit Center
290001792005 JA 29000179 1,105,837.60 251490
290001802005 JA 29000180 1,171,001.00 251490
290001832005 JA 29000183 -1,105,837.60 251490
290001792005 JA 29000201 -1,105,837.60 251490
290001802005 JA 29000202 -1,171,001.00 251490
290001832005 JA 29000205 1,105,837.60 251490
290001302006 JA 29000130 1,622,723.00 251490
290001302006 JA 29000149 -1,622,723.00 251490

The above is the example can you please write the macro and reply to me immediately

EggHeadCafe - Software Developer Portal of Choice
EggHeadCafe Lets Visitors Slap Microsoft
http://www.eggheadcafe.com/tutorial...7-92de78d650ef/eggheadcafe-lets-visitors.aspx
 
G

Gary''s Student

You may not need a macro. With your sample data in A1 thru E8, in F1 enter:
=ABS(D1) and copy down.

Then sort cols A thru F by F. We see:

290001792005 JA 29000179 1,105,837.60 251490 1,105,837.60
290001832005 JA 29000183 -1,105,837.60 251490 1,105,837.60
290001792005 JA 29000201 -1,105,837.60 251490 1,105,837.60
290001832005 JA 29000205 1,105,837.60 251490 1,105,837.60
290001802005 JA 29000180 1,171,001.00 251490 1,171,001.00
290001802005 JA 29000202 -1,171,001.00 251490 1,171,001.00
290001302006 JA 29000130 1,622,723.00 251490 1,622,723.00
290001302006 JA 29000149 -1,622,723.00 251490 1,622,723.00


The data is now organized into matching pairs.
 
Top