Hi experts,
I have about 300 customers contains ranges and they are different how many rows for each range . so I expect to reach 9000 rows in the sheet.
what I look for macro populate last amount is existed in column E and put in adjacant cell in column F , but if the last amount in column E is zero then don't populate last amount in adjacant cell in column F. after that will create report in column H:M from row2.
in column (I) will brings names from column(C) and column J will brings the first date , column K will brings the last date and column L will brings amount from column F , if there is duplicates names then should merge in column M for last duplicates names (when there are duplicates names ,then should put under each other of them in column (I). also insert BALANCE row to sum column L
Example:
output should be like this
when add new data for any customer like this
output should start from old last amount is existed in column F.
I have about 300 customers contains ranges and they are different how many rows for each range . so I expect to reach 9000 rows in the sheet.
what I look for macro populate last amount is existed in column E and put in adjacant cell in column F , but if the last amount in column E is zero then don't populate last amount in adjacant cell in column F. after that will create report in column H:M from row2.
in column (I) will brings names from column(C) and column J will brings the first date , column K will brings the last date and column L will brings amount from column F , if there is duplicates names then should merge in column M for last duplicates names (when there are duplicates names ,then should put under each other of them in column (I). also insert BALANCE row to sum column L
Example:
Alaa.xlsm | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | |||
1 | NAME | ITEM | NAME | FROM DATE | TO DATE | BALANCE | TOTAL | ||||||||
2 | ALA | ||||||||||||||
3 | DATE | Describe | DEBIT | CREDIT | BALANCE | ||||||||||
4 | 05/01/2022 | NOT PAID | 1,233.00 | 1,233.00 | |||||||||||
5 | 06/01/2022 | NOT PAID | 1,233.00 | 2,466.00 | |||||||||||
6 | 07/01/2022 | PAID | 2,000.00 | 466.00 | |||||||||||
7 | 08/01/2022 | PAID | 466.00 | 0.00 | |||||||||||
8 | |||||||||||||||
9 | |||||||||||||||
10 | NAME | ||||||||||||||
11 | MAL | ||||||||||||||
12 | DATE | Describe | DEBIT | CREDIT | BALANCE | ||||||||||
13 | 08/01/2022 | 0.00 | |||||||||||||
14 | 09/01/2022 | NOT PAID | 2,000.00 | 2,000.00 | |||||||||||
15 | 11/01/2022 | NOT PAID | 2,000.00 | 1,000.00 | 2,000.00 | ||||||||||
16 | 11/01/2022 | NOT PAID | 2,000.00 | 2,000.00 | 2,000.00 | ||||||||||
17 | |||||||||||||||
18 | |||||||||||||||
19 | NAME | ||||||||||||||
20 | MOUNIRR | ||||||||||||||
21 | DATE | Describe | DEBIT | CREDIT | BALANCE | ||||||||||
22 | 11/01/2022 | 1,000.00 | |||||||||||||
23 | 12/01/2022 | NOT PAID | 1,500.00 | 2,500.00 | |||||||||||
24 | 13/01/2022 | NOT PAID | 500.00 | 2,000.00 | |||||||||||
25 | 14/01/2022 | PAID | 2,000.00 | 1,000.00 | 3,000.00 | ||||||||||
26 | 15/01/2022 | PAID | 1,010.00 | 1,990.00 | |||||||||||
27 | 16/01/2022 | PAID | 1,000.00 | 990.00 | |||||||||||
28 | 17/01/2022 | PAID | 100.00 | 880.00 | |||||||||||
CSS |
output should be like this
Alaa.xlsm | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | |||
1 | NAME | ITEM | NAME | FROM DATE | TO DATE | BALANCE | TOTAL | ||||||||
2 | ALA | 1 | MAL | 08/01/2022 | 11/01/2022 | 2,000.00 | |||||||||
3 | DATE | Describe | DEBIT | CREDIT | BALANCE | 2 | MOUNIRR | 11/01/2022 | 17/01/2022 | 880.00 | |||||
4 | 05/01/2022 | NOT PAID | 1,233.00 | 1,233.00 | BALANCE | 2,880.00 | |||||||||
5 | 06/01/2022 | NOT PAID | 1,233.00 | 2,466.00 | |||||||||||
6 | 07/01/2022 | PAID | 2,000.00 | 466.00 | |||||||||||
7 | 08/01/2022 | PAID | 466.00 | 0.00 | |||||||||||
8 | |||||||||||||||
9 | |||||||||||||||
10 | NAME | ||||||||||||||
11 | MAL | ||||||||||||||
12 | DATE | Describe | DEBIT | CREDIT | BALANCE | ||||||||||
13 | 08/01/2022 | 0.00 | |||||||||||||
14 | 09/01/2022 | NOT PAID | 2,000.00 | 2,000.00 | |||||||||||
15 | 11/01/2022 | NOT PAID | 2,000.00 | 1,000.00 | 2,000.00 | ||||||||||
16 | 11/01/2022 | NOT PAID | 2,000.00 | 2,000.00 | 2,000.00 | 2,000.00 | |||||||||
17 | |||||||||||||||
18 | |||||||||||||||
19 | NAME | ||||||||||||||
20 | MOUNIRR | ||||||||||||||
21 | DATE | Describe | DEBIT | CREDIT | BALANCE | ||||||||||
22 | 11/01/2022 | 1,000.00 | |||||||||||||
23 | 12/01/2022 | NOT PAID | 1,500.00 | 2,500.00 | |||||||||||
24 | 13/01/2022 | NOT PAID | 500.00 | 2,000.00 | |||||||||||
25 | 14/01/2022 | PAID | 2,000.00 | 1,000.00 | 3,000.00 | ||||||||||
26 | 15/01/2022 | PAID | 1,010.00 | 1,990.00 | |||||||||||
27 | 16/01/2022 | PAID | 1,000.00 | 990.00 | |||||||||||
28 | 17/01/2022 | PAID | 100.00 | 880.00 | 880.00 | ||||||||||
CSS |
Cell Formulas | ||
---|---|---|
Range | Formula | |
L4 | L4 | =SUM(L2:L3) |
when add new data for any customer like this
Alaa.xlsm | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | |||
1 | NAME | ITEM | NAME | FROM DATE | TO DATE | BALANCE | ||||||||
2 | ALA | 1 | MAL | 08/01/2022 | 11/01/2022 | 2,000.00 | ||||||||
3 | DATE | Describe | DEBIT | CREDIT | BALANCE | 2 | MOUNIRR | 11/01/2022 | 17/01/2022 | 880.00 | ||||
4 | 05/01/2022 | NOT PAID | 1,233.00 | 1,233.00 | BALANCE | |||||||||
5 | 06/01/2022 | NOT PAID | 1,233.00 | 2,466.00 | ||||||||||
6 | 07/01/2022 | PAID | 2,000.00 | 466.00 | ||||||||||
7 | 08/01/2022 | PAID | 466.00 | 0.00 | ||||||||||
8 | 09/01/2022 | PAID | 100.00 | -100.00 | ||||||||||
9 | 10/01/2022 | PAID | 100.00 | -200.00 | ||||||||||
10 | ||||||||||||||
11 | ||||||||||||||
12 | NAME | |||||||||||||
13 | MAL | |||||||||||||
14 | DATE | Describe | DEBIT | CREDIT | BALANCE | |||||||||
15 | 08/01/2022 | 0.00 | ||||||||||||
16 | 09/01/2022 | NOT PAID | 2,000.00 | 2,000.00 | ||||||||||
17 | 11/01/2022 | NOT PAID | 2,000.00 | 1,000.00 | 2,000.00 | |||||||||
18 | 11/01/2022 | NOT PAID | 2,000.00 | 2,000.00 | 2,000.00 | 2,000.00 | ||||||||
19 | 12/01/2022 | NOT PAID | 1,000.00 | 3,000.00 | ||||||||||
20 | 13/01/2022 | PAID | 2,000.00 | 1,000.00 | ||||||||||
21 | ||||||||||||||
22 | ||||||||||||||
23 | NAME | |||||||||||||
24 | MOUNIRR | |||||||||||||
25 | DATE | Describe | DEBIT | CREDIT | BALANCE | |||||||||
26 | 11/01/2022 | 1,000.00 | ||||||||||||
27 | 12/01/2022 | NOT PAID | 1,500.00 | 2,500.00 | ||||||||||
28 | 13/01/2022 | NOT PAID | 500.00 | 2,000.00 | ||||||||||
29 | 14/01/2022 | PAID | 2,000.00 | 1,000.00 | 3,000.00 | |||||||||
30 | 15/01/2022 | PAID | 1,010.00 | 1,990.00 | ||||||||||
31 | 16/01/2022 | PAID | 1,000.00 | 990.00 | ||||||||||
32 | 17/01/2022 | PAID | 100.00 | 880.00 | 880.00 | |||||||||
CSS |
output should start from old last amount is existed in column F.
Alaa.xlsm | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | |||
1 | NAME | ITEM | NAME | FROM DATE | TO DATE | BALANCE | TOTAL | ||||||||
2 | ALA | 1 | ALA | 09/01/2022 | 10/01/2022 | -200.00 | |||||||||
3 | DATE | Describe | DEBIT | CREDIT | BALANCE | 2 | MAL | 08/01/2022 | 11/01/2022 | 2,000.00 | |||||
4 | 05/01/2022 | NOT PAID | 1,233.00 | 1,233.00 | 3 | MAL | 12/01/2022 | 13/01/2022 | 1,000.00 | 3,000.00 | |||||
5 | 06/01/2022 | NOT PAID | 1,233.00 | 2,466.00 | 4 | MOUNIRR | 11/01/2022 | 17/01/2022 | 880.00 | ||||||
6 | 07/01/2022 | PAID | 2,000.00 | 466.00 | BALANCE | 3,680.00 | |||||||||
7 | 08/01/2022 | PAID | 466.00 | 0.00 | |||||||||||
8 | 09/01/2022 | PAID | 100.00 | -100.00 | |||||||||||
9 | 10/01/2022 | PAID | 100.00 | -200.00 | -200.00 | ||||||||||
10 | |||||||||||||||
11 | |||||||||||||||
12 | NAME | ||||||||||||||
13 | MAL | ||||||||||||||
14 | DATE | Describe | DEBIT | CREDIT | BALANCE | ||||||||||
15 | 08/01/2022 | 0.00 | |||||||||||||
16 | 09/01/2022 | NOT PAID | 2,000.00 | 2,000.00 | |||||||||||
17 | 11/01/2022 | NOT PAID | 2,000.00 | 1,000.00 | 2,000.00 | ||||||||||
18 | 11/01/2022 | NOT PAID | 2,000.00 | 2,000.00 | 2,000.00 | 2,000.00 | |||||||||
19 | 12/01/2022 | NOT PAID | 1,000.00 | 3,000.00 | |||||||||||
20 | 13/01/2022 | PAID | 2,000.00 | 1,000.00 | 1,000.00 | ||||||||||
21 | |||||||||||||||
22 | |||||||||||||||
23 | NAME | ||||||||||||||
24 | MOUNIRR | ||||||||||||||
25 | DATE | Describe | DEBIT | CREDIT | BALANCE | ||||||||||
26 | 11/01/2022 | 1,000.00 | |||||||||||||
27 | 12/01/2022 | NOT PAID | 1,500.00 | 2,500.00 | |||||||||||
28 | 13/01/2022 | NOT PAID | 500.00 | 2,000.00 | |||||||||||
29 | 14/01/2022 | PAID | 2,000.00 | 1,000.00 | 3,000.00 | ||||||||||
30 | 15/01/2022 | PAID | 1,010.00 | 1,990.00 | |||||||||||
31 | 16/01/2022 | PAID | 1,000.00 | 990.00 | |||||||||||
32 | 17/01/2022 | PAID | 100.00 | 880.00 | 880.00 | ||||||||||
CSS |
Cell Formulas | ||
---|---|---|
Range | Formula | |
L6 | L6 | =SUM(L2:L5) |