macro to match partial item in list across sheet and populate amounts.

Abdo

Board Regular
Joined
May 16, 2022
Messages
201
Office Version
  1. 2019
  2. 2010
Platform
  1. Windows
Hi experts,
maybe this way see some members is strange or not logic about calculation , but I need this way .
my idea will match partial item in list in SUMMARY sheet with the same partial item across sheets , if the same partial of the item is existed in columns DEBIT , CREDIT . first of all will merge amount for DEBIT or CREDIT column in the same sheet , second should sum DEBIT,CREDIT columns together
example : in summary sheet will match PUR PURCHASE across sheets .
in CSMN PURCHASE will be after sum DEBIT=112,800 and in CSMT PURCHASE sheet will be after sum CREDIT =66000 so the final result as show in summary sheet will be = 112800+66000=178800 and so on for the others items also I will add new sheets before summary sheet with the same structure and the same idea .
every time I will add new items in column B for summary sheet .
REF.xlsm
ABCD
1DATEACCOUNT REFDEBITCREDIT
201/05/2023PUR PURCHASE INV 00001120,000.00
302/05/2023PUR PURCHASE INV 00001220,000.00
403/05/2023PUR PURCHASE INV 00001320,000.00
504/05/2023PUR PURCHASE INV 00001420,000.00
605/05/2023PUR PURCHASE INV 00001520,000.00
706/05/2023PA PAYING 7891,000.00
807/05/2023PA PAYING 7901,000.00
908/05/2023PUR PURCHASE INV 0000162,000.00
1009/05/2023PUR PURCHASE INV 0000171,200.00
1110/05/2023PUR PURCHASE INV 0000181,300.00
1211/05/2023PUR PURCHASE INV 0000191,400.00
1312/05/2023PUR PURCHASE INV 0000201,000.00
1413/05/2023PUR PURCHASE INV 0000211,200.00
1514/05/2023PUR PURCHASE INV 0000221,200.00
1615/05/2023PUR PURCHASE INV 0000231,200.00
1716/05/2023PUR PURCHASE INV 0000241,300.00
1817/05/2023PUR PURCHASE INV 0000251,000.00
CSMN PURCHASE



REF.xlsm
ABCD
1DATEACCOUNT REFDEBITCREDIT
201/05/2023PUR PURCHASE INV 00001112,000.00
302/05/2023PUR PURCHASE INV 00001123,000.00
403/05/2023PUR PURCHASE INV 00001134,000.00
504/05/2023PUR PURCHASE INV 00001145,000.00
605/05/2023PUR PURCHASE INV 00001156,000.00
706/05/2023PUR PURCHASE INV 00001167,000.00
807/05/2023PUR PURCHASE INV 00001178,000.00
908/05/2023PUR PURCHASE INV 00001189,000.00
1009/05/2023PA PAYING 791300.00
1110/05/2023PA PAYING 792400.00
1211/05/2023PA PAYING 793500.00
1312/05/2023PA PAYING 794340.00
1413/05/2023PUR PURCHASE INV 00001193,000.00
1514/05/2023PUR PURCHASE INV 00001204,000.00
1615/05/2023PUR PURCHASE INV 00001215,000.00
1716/05/2023PUR PURCHASE INV 00001226,000.00
1817/05/2023PUR PURCHASE INV 00001234,000.00
CSMT PURCHASE


REF.xlsm
ABCD
1DATEACCOUNT REFDEBITCREDIT
201/05/2023VC VOUCHER PAY 100011,200.00
302/05/2023VC VOUCHER PAY 100021,800.00
403/05/2023VC VOUCHER PAY 100031,200.00
504/05/2023VC VOUCHER PAY 100041,300.00
605/05/2023VC VOUCHER PAY 100051,400.00
706/05/2023VC VOUCHER PAY 100061,500.00
807/05/2023VC VOUCHER PAY 100071,700.00
908/05/2023VC VOUCHER PAY 10008
1009/05/2023VC VOUCHER RECEIVED 100092,000.00
1110/05/2023VC VOUCHER RECEIVED 100103,000.00
1211/05/2023VC VOUCHER PAY 10011600.00
1312/05/2023VC VOUCHER PAY 10012700.00
1413/05/2023VC VOUCHER PAY 10013600.00
CSMN CASH



REF.xlsm
ABCD
1DATEACCOUNT REFDEBITCREDIT
201/06/2023VC VOUCHER RECEIVED V 10002,000.00
302/06/2023VC VOUCHER RECEIVED V 10013,000.00
403/06/2023VC VOUCHER RECEIVED V 10024,000.00
504/06/2023VC VOUCHER RECEIVED V 10033,000.00
605/06/2023VC VOUCHER PAY 100142,000.00
706/06/2023VC VOUCHER PAY 100153,000.00
807/06/2023VC VOUCHER PAY 100161,200.00
908/06/2023VC VOUCHER PAY 100171,000.00
1009/06/2023VC VOUCHER PAY 100181,200.00
1110/06/2023VC VOUCHER PAY 100191,300.00
1211/06/2023VC VOUCHER RECEIVED V 1004200.00
1312/06/2023VC VOUCHER RECEIVED V 1005225.00
1413/06/2023VC VOUCHER RECEIVED V 1006300.00
1514/06/2023VC VOUCHER RECEIVED V 1007400.00
1615/06/2023VC VOUCHER RECEIVED V 1008500.00
1716/06/2023VC VOUCHER RECEIVED V 1009600.00
1817/06/2023VC VOUCHER RECEIVED V 1010700.00
SRTRYUH CASH




REF.xlsm
ABCD
1DATEACCOUNT REFDEBITCREDIT
201/06/2023SAL SALES SR00014,000.00
302/06/2023SAL SALES SR00028,000.00
403/06/2023SAL SALES SR00033,000.00
504/06/2023SAL SALES SR00042,000.00
605/06/2023SAL SALES SR00051,000.00
706/06/2023SAL SALES SR00061,200.00
807/06/2023SAL SALES SR00075,000.00
908/06/2023RE SALES SR00082,000.00
1009/06/2023RE SALES SR00091,200.00
1110/06/2023RE SALES SR00101,300.00
1211/06/2023SAL SALES SR000114,000.00
1312/06/2023SAL SALES SR000121,200.00
1413/06/2023SAL SALES SR000132,000.00
1514/06/2023SAL SALES SR000142,000.00
1615/06/2023SAL SALES SR000152,000.00
1716/06/2023SAL SALES SR000162,000.00
1817/06/2023SAL SALES SR000172,000.00
SRTRYUH SR SALE



REF.xlsm
ABC
1ITEMACCOUNT REFBALANCE
21PUR PURCHASE
32PA PAYING
43VC VOUCHER PAY
54VC VOUCHER RECEIVED
65SAL SALES
76RE SALES
87
98
109
1110
1211
1312
1413
1514
1615
1716
18CALCULATION
summary




OUTPUT should be
REF.xlsm
ABC
1ITEMACCOUNT REFBALANCE
21PUR PURCHASE178,800.00
32PA PAYING3,540.00
43VC VOUCHER PAY21,700.00
54VC VOUCHER RECEIVED19,925.00
65SAL SALES39,400.00
76RE SALES4,500.00
87
98
109
1110
1211
1312
1413
1514
1615
1716
18CALCULATION
summary

thanks
 
You're welcome, glad to help & thanks for the feedback.:)
 
Upvote 0

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"

Forum statistics

Threads
1,223,227
Messages
6,170,853
Members
452,361
Latest member
d3ad3y3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top