Hi experts,
I hope finding macro to deal with client no to merge amounts in DEBIT , CREDIT but the merging will be for duplicates CLIENT NO within two dates when add data for every time .
so the report will be in columns I:N
in columns I,J will brings from column A and column K will brings from column C and columns LM will merge from column E ,F based on duplicates client no in column C within dates in column A .
the column N will subtract column L from column F and insert TOTAL row to sum column L,M .
example:
result
example:
result
another example and important
result
as you see there is duplicates client no then should not merge for all of duplicates name, just merge within two dates alone for new process.
the project depends on add new data for every time so when add previous data don't repeat again.
I hope to get chance who can write code for me.
thanks
I hope finding macro to deal with client no to merge amounts in DEBIT , CREDIT but the merging will be for duplicates CLIENT NO within two dates when add data for every time .
so the report will be in columns I:N
in columns I,J will brings from column A and column K will brings from column C and columns LM will merge from column E ,F based on duplicates client no in column C within dates in column A .
the column N will subtract column L from column F and insert TOTAL row to sum column L,M .
example:
المصنف1 | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | |||
1 | DATE | INVOICE NO | CLIENT NO | DESCRIBE | DEBIT | CREDIT | BALANCE | ||||||||||
2 | 01/01/2022 | - | ABDEND1 | OPENNING | 20,000.00 | 0.00 | 20,000.00 | ||||||||||
3 | 04/01/2022 | PA-B3 | ABDEND1 | PA | 20,000.00 | 0.00 | 40,000.00 | ||||||||||
4 | 05/01/2022 | SA-B35 | ABDEND1 | SA | 0.00 | 1,000.00 | 39,000.00 | ||||||||||
DEB |
result
المصنف1 | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | N | |||
1 | DATE | INVOICE NO | CLIENT NO | DESCRIBE | DEBIT | CREDIT | BALANCE | FROM DATE | TO DATE | CLIENT NO | DEBIT | CREDIT | BALANCE | |||
2 | 01/01/2022 | - | ABDEND1 | OPENNING | 20,000.00 | 0.00 | 20,000.00 | 01/01/2022 | 05/01/2022 | ABDEND1 | 40,000.00 | 1,000.00 | 39,000.00 | |||
3 | 04/01/2022 | PA-B3 | ABDEND1 | PA | 20,000.00 | 0.00 | 40,000.00 | TOTAL | 40,000.00 | 1,000.00 | 39,000.00 | |||||
4 | 05/01/2022 | SA-B35 | ABDEND1 | SA | 0.00 | 1,000.00 | 39,000.00 | |||||||||
DEB |
Cell Formulas | ||
---|---|---|
Range | Formula | |
N2:N3 | N2 | =L2-M2 |
L3:M3 | L3 | =SUM(L2) |
example:
المصنف1 | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | N | |||
1 | DATE | INVOICE NO | CLIENT NO | DESCRIBE | DEBIT | CREDIT | BALANCE | FROM DATE | TO DATE | CLIENT NO | DEBIT | CREDIT | BALANCE | |||
2 | 01/01/2022 | - | ABDEND1 | OPENNING | 20,000.00 | 0.00 | 20,000.00 | 01/01/2022 | 05/01/2022 | ABDEND1 | 40,000.00 | 1,000.00 | 39,000.00 | |||
3 | 04/01/2022 | PA-B3 | ABDEND1 | PA | 20,000.00 | 0.00 | 40,000.00 | TOTAL | 40,000.00 | 1,000.00 | 39,000.00 | |||||
4 | 05/01/2022 | SA-B35 | ABDEND1 | SA | 0.00 | 1,000.00 | 39,000.00 | |||||||||
5 | 06/01/2022 | - | ABDEND10 | OPENNING | 10,000.00 | 0.00 | 10,000.00 | |||||||||
6 | 06/01/2022 | PA-B4 | ABDEND10 | PA | 2,000.00 | 8,000.00 | ||||||||||
7 | 07/01/2022 | SA-B36 | ABDEND10 | SA | 0.00 | 500.00 | 7,500.00 | |||||||||
DEB |
Cell Formulas | ||
---|---|---|
Range | Formula | |
N2:N3 | N2 | =L2-M2 |
L3:M3 | L3 | =SUM(L2:L2) |
result
المصنف1 | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | N | |||
1 | DATE | INVOICE NO | CLIENT NO | DESCRIBE | DEBIT | CREDIT | BALANCE | FROM DATE | TO DATE | CLIENT NO | DEBIT | CREDIT | BALANCE | |||
2 | 01/01/2022 | - | ABDEND1 | OPENNING | 20,000.00 | 0.00 | 20,000.00 | 01/01/2022 | 05/01/2022 | ABDEND1 | 40,000.00 | 1,000.00 | 39,000.00 | |||
3 | 04/01/2022 | PA-B3 | ABDEND1 | PA | 20,000.00 | 0.00 | 40,000.00 | 06/01/2022 | 07/01/2022 | ABDEND10 | 10,000.00 | 2,500.00 | 7,500.00 | |||
4 | 05/01/2022 | SA-B35 | ABDEND1 | SA | 0.00 | 1,000.00 | 39,000.00 | TOTAL | 50,000.00 | 3,500.00 | 46,500.00 | |||||
5 | 06/01/2022 | - | ABDEND10 | OPENNING | 10,000.00 | 0.00 | 10,000.00 | |||||||||
6 | 06/01/2022 | PA-B4 | ABDEND10 | PA | 2,000.00 | 8,000.00 | ||||||||||
7 | 07/01/2022 | SA-B36 | ABDEND10 | SA | 0.00 | 500.00 | 7,500.00 | |||||||||
DEB |
Cell Formulas | ||
---|---|---|
Range | Formula | |
N2:N4 | N2 | =L2-M2 |
L4:M4 | L4 | =SUM(L2:L3) |
another example and important
المصنف1 | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | N | |||
1 | DATE | INVOICE NO | CLIENT NO | DESCRIBE | DEBIT | CREDIT | BALANCE | FROM DATE | TO DATE | CLIENT NO | DEBIT | CREDIT | BALANCE | |||
2 | 01/01/2022 | - | ABDEND1 | OPENNING | 20,000.00 | 0.00 | 20,000.00 | 01/01/2022 | 05/01/2022 | ABDEND1 | 40,000.00 | 1,000.00 | 39,000.00 | |||
3 | 04/01/2022 | PA-B3 | ABDEND1 | PA | 20,000.00 | 0.00 | 40,000.00 | 06/01/2022 | 07/01/2022 | ABDEND10 | 10,000.00 | 2,500.00 | 7,500.00 | |||
4 | 05/01/2022 | SA-B35 | ABDEND1 | SA | 0.00 | 1,000.00 | 39,000.00 | TOTAL | 50,000.00 | 3,500.00 | 46,500.00 | |||||
5 | 06/01/2022 | - | ABDEND10 | OPENNING | 10,000.00 | 0.00 | 10,000.00 | |||||||||
6 | 06/01/2022 | PA-B4 | ABDEND10 | PA | 2,000.00 | 8,000.00 | ||||||||||
7 | 07/01/2022 | SA-B36 | ABDEND10 | SA | 0.00 | 500.00 | 7,500.00 | |||||||||
8 | 09/01/2022 | PA-B5 | ABDEND1 | PA | 1,200.00 | 0.00 | 1,200.00 | |||||||||
9 | 10/01/2022 | PA-B6 | ABDEND1 | SA | 1,000.00 | 2,200.00 | ||||||||||
10 | 11/01/2022 | SA-B38 | ABDEND1 | SA | 0.00 | 2,000.00 | 200.00 | |||||||||
DEB |
Cell Formulas | ||
---|---|---|
Range | Formula | |
N2:N4 | N2 | =L2-M2 |
L4:M4 | L4 | =SUM(L2:L3) |
result
المصنف1 | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | N | |||
1 | DATE | INVOICE NO | CLIENT NO | DESCRIBE | DEBIT | CREDIT | BALANCE | FROM DATE | TO DATE | CLIENT NO | DEBIT | CREDIT | BALANCE | |||
2 | 01/01/2022 | - | ABDEND1 | OPENNING | 20,000.00 | 0.00 | 20,000.00 | 01/01/2022 | 05/01/2022 | ABDEND1 | 40,000.00 | 1,000.00 | 39,000.00 | |||
3 | 04/01/2022 | PA-B3 | ABDEND1 | PA | 20,000.00 | 0.00 | 40,000.00 | 06/01/2022 | 07/01/2022 | ABDEND10 | 10,000.00 | 2,500.00 | 7,500.00 | |||
4 | 05/01/2022 | SA-B35 | ABDEND1 | SA | 0.00 | 1,000.00 | 39,000.00 | 09/01/2022 | 11/01/2022 | ABDEND1 | 2,200.00 | 2,000.00 | 200.00 | |||
5 | 06/01/2022 | - | ABDEND10 | OPENNING | 10,000.00 | 0.00 | 10,000.00 | TOTAL | 52,200.00 | 5,500.00 | 46,700.00 | |||||
6 | 06/01/2022 | PA-B4 | ABDEND10 | PA | 2,000.00 | 8,000.00 | ||||||||||
7 | 07/01/2022 | SA-B36 | ABDEND10 | SA | 0.00 | 500.00 | 7,500.00 | |||||||||
8 | 09/01/2022 | PA-B5 | ABDEND1 | PA | 1,200.00 | 0.00 | 1,200.00 | |||||||||
9 | 10/01/2022 | PA-B6 | ABDEND1 | SA | 1,000.00 | 2,200.00 | ||||||||||
10 | 11/01/2022 | SA-B38 | ABDEND1 | SA | 0.00 | 2,000.00 | 200.00 | |||||||||
DEB |
Cell Formulas | ||
---|---|---|
Range | Formula | |
N5,N2:N3 | N2 | =L2-M2 |
L5:M5 | L5 | =SUM(L2:L4) |
as you see there is duplicates client no then should not merge for all of duplicates name, just merge within two dates alone for new process.
the project depends on add new data for every time so when add previous data don't repeat again.
I hope to get chance who can write code for me.
thanks