Hello,
I would macro for search BALANCE word in different location for each sheet.
so the BALANCE column will not be in the same location for each sheet .
should extract date(today) in column A , sheet name in column B and the last amount is existed in BALANCE column for each sheet as I did in BALANCES sheet.
the data for each sheet will be more about 9000 rows for each sheet also I will add more new sheets before BALANCES sheet. so the macro should deal with sheets are just before BALANCES sheet .
RESULT with create formatting and borders
I hope finding macro to do that.
thanks
I would macro for search BALANCE word in different location for each sheet.
so the BALANCE column will not be in the same location for each sheet .
should extract date(today) in column A , sheet name in column B and the last amount is existed in BALANCE column for each sheet as I did in BALANCES sheet.
the data for each sheet will be more about 9000 rows for each sheet also I will add more new sheets before BALANCES sheet. so the macro should deal with sheets are just before BALANCES sheet .
OMRA.xlsm | ||||||
---|---|---|---|---|---|---|
A | B | C | D | |||
1 | DATE | DEBIT | CREDIT | BALANCE | ||
2 | 11/03/2024 | 1,000.00 | 1,000.00 | |||
3 | 12/03/2024 | 2,000.00 | 3,000.00 | |||
4 | 13/03/2024 | 1,000.00 | 2,000.00 | |||
5 | 14/03/2024 | 500.00 | 2,500.00 | |||
6 | 15/03/2024 | 100.00 | 2,600.00 | |||
7 | 16/03/2024 | 600.00 | 2,000.00 | |||
8 | TOTAL | 3,600.00 | 1,600.00 | 2,000.00 | ||
OMAR |
Cell Formulas | ||
---|---|---|
Range | Formula | |
B8:C8 | B8 | =SUM(B2:B7) |
D8 | D8 | =B8-C8 |
OMRA.xlsm | ||||||
---|---|---|---|---|---|---|
A | B | C | D | |||
1 | DATE | DEBIT | CREDIT | BALANCE | ||
2 | 12/03/2024 | 1,000.00 | -1,000.00 | |||
3 | 13/03/2024 | 4,000.00 | -5,000.00 | |||
4 | 14/03/2024 | 1,000.00 | -6,000.00 | |||
5 | 14/03/2024 | 1,000.00 | -5,000.00 | |||
6 | 15/03/2024 | 3,000.00 | -2,000.00 | |||
7 | TOTAL | 4,000.00 | 6,000.00 | -2,000.00 | ||
OMRAN |
Cell Formulas | ||
---|---|---|
Range | Formula | |
B7:C7 | B7 | =SUM(B2:B6) |
D7 | D7 | =B7-C7 |
OMRA.xlsm | |||||||
---|---|---|---|---|---|---|---|
A | B | C | D | E | |||
1 | ITEM | ID | QTY | UNIT PRICE | BALANCE | ||
2 | 1 | ERT555 | 200.00 | 1,200.00 | 240,000.00 | ||
3 | 2 | ERT556 | 890.00 | 600.00 | 534,000.00 | ||
4 | 3 | ERT557 | 200.00 | 120.00 | 24,000.00 | ||
5 | 4 | ERT558 | 100.00 | 250.00 | 25,000.00 | ||
6 | 5 | ERT559 | 150.00 | 300.00 | 45,000.00 | ||
7 | TOTAL | 868,000.00 | |||||
STOCK |
Cell Formulas | ||
---|---|---|
Range | Formula | |
E2:E6 | E2 | =C2*D2 |
E7 | E7 | =SUM(E2:E6) |
OMRA.xlsm | |||||
---|---|---|---|---|---|
A | B | C | |||
1 | ITEM | DETAILS | BALANCE | ||
2 | 1 | SAFE | 200,000.00 | ||
3 | 2 | BANK1 | 300,000.00 | ||
4 | 3 | BANK2 | 400,000.00 | ||
5 | TOTAL | 900,000.00 | |||
SAFES |
Cell Formulas | ||
---|---|---|
Range | Formula | |
C5 | C5 | =SUM(C2:C4) |
OMRA.xlsm | |||||
---|---|---|---|---|---|
A | B | C | |||
1 | DATE | DETAILES | BALANCE | ||
2 | |||||
3 | |||||
4 | |||||
5 | |||||
6 | |||||
7 | |||||
8 | |||||
9 | |||||
10 | |||||
11 | |||||
12 | |||||
13 | |||||
BALANCES |
RESULT with create formatting and borders
OMRA.xlsm | |||||
---|---|---|---|---|---|
A | B | C | |||
1 | DATE | DETAILES | BALANCE | ||
2 | 26/10/2024 | OMAR | 2,000.00 | ||
3 | 26/10/2024 | OMRAN | -2,000.00 | ||
4 | 26/10/2024 | STOCK | 868,000.00 | ||
5 | 26/10/2024 | SAFES | 900,000.00 | ||
6 | TOTAL | 1,768,000.00 | |||
BALANCES |
Cell Formulas | ||
---|---|---|
Range | Formula | |
C6 | C6 | =SUM(C2:C5) |
I hope finding macro to do that.
thanks