Hi guys
I need macro import balance from closed file to open file based on match sheet name for the closed file with cell B2 for open file
then should populate amount from column F in last row to D2 for open file.
both files are existed in the same folder "C:\Users\RAMDANI\Desktop\BALANCES"
closed file
open file
result
another case
result
and should replace value every time run the macro .
I need macro import balance from closed file to open file based on match sheet name for the closed file with cell B2 for open file
then should populate amount from column F in last row to D2 for open file.
both files are existed in the same folder "C:\Users\RAMDANI\Desktop\BALANCES"
closed file
as | ||||||
---|---|---|---|---|---|---|
C | D | E | F | |||
1 | DESCRIBE | DEBIT | CREDIT | BALANCE | ||
2 | INVO-001 | 2,000.000 | 2,000.000 | |||
3 | PAID | 1,000.000 | 1,000.000 | |||
ALI |
open file
qw | ||||||
---|---|---|---|---|---|---|
A | B | C | D | |||
1 | CLIENT | BALANCE | ||||
2 | ALI | |||||
3 | ||||||
4 | ||||||
5 | ||||||
6 | ||||||
7 | ||||||
8 | ||||||
9 | ||||||
10 | ||||||
SS |
result
qw | |||||
---|---|---|---|---|---|
B | C | D | |||
1 | CLIENT | BALANCE | |||
2 | ALI | 1000 | |||
SS |
another case
as | ||||||
---|---|---|---|---|---|---|
C | D | E | F | |||
1 | DESCRIBE | DEBIT | CREDIT | BALANCE | ||
2 | INVO-002 | 2,000.000 | 1,000.000 | 1,000.000 | ||
3 | PAID | 500.000 | 1,000.000 | 500.000 | ||
4 | INVO-003 | 2,000.000 | 2,500.000 | |||
5 | INVO-004 | 1,500.000 | 4,000.000 | |||
6 | INVO-005 | 2,000.000 | 6,000.000 | |||
7 | PAID | 1,200.000 | 4,800.000 | |||
OMAR |
qw | |||||
---|---|---|---|---|---|
B | C | D | |||
1 | CLIENT | BALANCE | |||
2 | OMAR | ||||
SS |
result
qw | |||||
---|---|---|---|---|---|
B | C | D | |||
1 | CLIENT | BALANCE | |||
2 | OMAR | 4800 | |||
SS |
and should replace value every time run the macro .