Hello ,
I have about 20000 rows divided multiple ranges . what I want to exclude lastrow contains TOTAL word in column A and exclude row contains FIRST DURETION word in column D for second row , sometimes not all ranges contain FIRST DURETION word .
after that should merge duplicated amounts in column E,F based on column D and sum whole columns D,E and show total as showing in column A,B to the bottom .every time add new ID in column D so will increase ID to show total in column A,B to the bottom.
before running macro
after running
thanks
I have about 20000 rows divided multiple ranges . what I want to exclude lastrow contains TOTAL word in column A and exclude row contains FIRST DURETION word in column D for second row , sometimes not all ranges contain FIRST DURETION word .
after that should merge duplicated amounts in column E,F based on column D and sum whole columns D,E and show total as showing in column A,B to the bottom .every time add new ID in column D so will increase ID to show total in column A,B to the bottom.
copy to bottom based on cell.xlsm | |||||||||
---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | |||
1 | DATE | INVOICE NO | CLIENT NO | DESCRIBE | DEBIT | CREDIT | BALANCE | ||
2 | 01/01/2024 | - | ABDEND1 | FIRST DURETION | 20,000.00 | 20,000.00 | |||
3 | 02/01/2024 | PA-B3 | ABDEND1 | PA | 20,000.00 | 40,000.00 | |||
4 | 03/01/2024 | SA-B35 | ABDEND1 | SA | 1,000.00 | 39,000.00 | |||
5 | TOTAL | 40,000.00 | 1,000.00 | 39,000.00 | |||||
6 | |||||||||
7 | |||||||||
8 | DATE | INVOICE NO | CLIENT NO | DESCRIBE | DEBIT | CREDIT | BALANCE | ||
9 | 14/01/2024 | PA-B352 | ABDEND10 | PA | 140.00 | 140.00 | |||
10 | 15/01/2024 | PA-B352 | ABDEND10 | PA | 100.00 | 0.00 | |||
11 | TOTAL | 240.00 | 240.00 | 0.00 | |||||
12 | |||||||||
13 | |||||||||
14 | DATE | INVOICE NO | CLIENT NO | DESCRIBE | DEBIT | CREDIT | BALANCE | ||
15 | 14/04/2024 | PA-B442 | ABDEND100 | FIRST DURETION | 1,040.00 | 1,040.00 | |||
16 | 15/04/2024 | PA-B442 | ABDEND100 | SA | 1,000.00 | 40.00 | |||
17 | 16/04/2024 | PA-B442 | ABDEND100 | PA | 2,000.00 | 2,040.00 | |||
18 | TOTAL | 3,040.00 | 1,000.00 | 2,040.00 | |||||
19 | |||||||||
20 | |||||||||
21 | DATE | INVOICE NO | CLIENT NO | DESCRIBE | DEBIT | CREDIT | BALANCE | ||
22 | 30/09/2024 | PA-B1342 | ABDEND1000 | FIRST DURETION | 10,040.00 | 10,040.00 | |||
23 | 01/10/2024 | PA-B1342 | ABDEND1000 | SA | 40.00 | 10,000.00 | |||
24 | 02/10/2024 | PA-B1342 | ABDEND1000 | SA | 8,000.00 | 2,000.00 | |||
25 | 03/10/2024 | PA-B1342 | ABDEND1000 | PA | 500.00 | 2,500.00 | |||
26 | TOTAL | 10,540.00 | 8,040.00 | 2,500.00 | |||||
splitting |
before running macro
copy to bottom based on cell.xlsm | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | |||
1 | |||||||||||
2 | |||||||||||
3 | |||||||||||
4 | |||||||||||
5 | |||||||||||
6 | |||||||||||
7 | |||||||||||
8 | |||||||||||
9 | |||||||||||
10 | |||||||||||
11 | |||||||||||
12 | |||||||||||
13 | |||||||||||
14 | |||||||||||
15 | |||||||||||
16 | |||||||||||
17 | |||||||||||
18 | |||||||||||
19 | |||||||||||
RESULT1 |
after running
copy to bottom based on cell.xlsm | ||||||||
---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | |||
1 | ITEM | INVOICE NO | CLIENT NO | DESCRIBE | DEBIT | CREDIT | ||
2 | 1 | PA-B3 | ABDEND1 | PA | 20,000.00 | |||
3 | 2 | SA-B35 | ABDEND1 | SA | 1,000.00 | |||
4 | 3 | PA-B352 | ABDEND10 | PA | 240.00 | |||
5 | 4 | PA-B442 | ABDEND100 | SA | 1,000.00 | |||
6 | 5 | PA-B442 | ABDEND100 | PA | 2,000.00 | |||
7 | 6 | PA-B1342 | ABDEND1000 | SA | 8,040.00 | |||
8 | 7 | PA-B1342 | ABDEND1000 | PA | 500.00 | |||
9 | ||||||||
10 | PA TOTAL | 22,740.00 | ||||||
11 | SA TOTAL | 1,040.00 | ||||||
RESULT1 |
thanks