Abuu Farhaan
New Member
- Joined
- Jan 7, 2025
- Messages
- 4
- Office Version
- 365
- Platform
- Windows
- Mobile
Hello,
I need a help on VBA code that will copy last sheet of workbook to the same workbook and after copying it will hide other sheets including the last sheet that i use to create a copy from and only remain the copied sheet and some other sheets in a workbook. Each sheet will be containing a particular information of a single date and after finishing to put information of a particular date e.g. 07 Jan 2025, then i will need to create another sheet of 08 Jan 2025 with template like 07 Jan 2025 and hide the sheets of previous date, and only remain current date sheet
I need a help on VBA code that will copy last sheet of workbook to the same workbook and after copying it will hide other sheets including the last sheet that i use to create a copy from and only remain the copied sheet and some other sheets in a workbook. Each sheet will be containing a particular information of a single date and after finishing to put information of a particular date e.g. 07 Jan 2025, then i will need to create another sheet of 08 Jan 2025 with template like 07 Jan 2025 and hide the sheets of previous date, and only remain current date sheet
MBEYA SALES JAN 2025.xlsm | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | |||
1 | GAS SUPPLIER | ALBASWAR SHOP | 07/01/2025 (Tue) | ||||||||||||||||||||
2 | # | PRODUCT | OPEN STOCK | STOCK IN THE STORE | STOCK ADDED TODAY | SOLD TODAY | HOWO | MWENGE | T516 DQA | T367 EHV | T379DMZ | T277 EEA | T571 EAH | T396 EEN | T856 DPD | T517 DWY | T408 EKB | CLOSE STOCK | CROSS CHECK | |||
3 | LPG GAS | EMPTY - 06KG | 4763.00 | 2478.00 | 7.00 | 1300.00 | 6.00 | 80.00 | 16.00 | 80.00 | 80.00 | 300.00 | 80.00 | 137.00 | 199.00 | 4756.00 | 0.00 | |||||
4 | EMPTY - 15KG | 222.00 | 131.00 | 6.00 | 39.00 | 2.00 | 4.00 | 10.00 | 4.00 | 4.00 | 10.00 | 4.00 | 8.00 | 216.00 | 0.00 | |||||||
5 | EMPTY - 38KG | 33.00 | 26.00 | 0.00 | 6.00 | 1.00 | 33.00 | 0.00 | ||||||||||||||
6 | REFILL - 06KG | 2523.00 | 1265.00 | 280.00 | 6.00 | 80.00 | 16.00 | 80.00 | 80.00 | 300.00 | 80.00 | 137.00 | 199.00 | 2243.00 | 0.00 | |||||||
7 | REFILL - 15KG | 164.00 | 112.00 | 6.00 | 2.00 | 4.00 | 10.00 | 4.00 | 4.00 | 10.00 | 4.00 | 8.00 | 158.00 | 0.00 | ||||||||
8 | REFILL - 38KG | 20.00 | 19.00 | 0.00 | 1.00 | 20.00 | 0.00 | |||||||||||||||
9 | ACCESSORIES | BURNER - KAZKAZ | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | |||||||||||||||
10 | BURNER KAWAIDA | 814.00 | 664.00 | 0.00 | 30.00 | 20.00 | 30.00 | 50.00 | 20.00 | 814.00 | 0.00 | |||||||||||
11 | HOSE - CLAMPS | 182.00 | 182.00 | 0.00 | 182.00 | 0.00 | ||||||||||||||||
12 | HOSE PIPE - FLEXIBLE - HP | 114.00 | 114.00 | 0.00 | 114.00 | 0.00 | ||||||||||||||||
13 | HOSE PIPE - WIRED | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | ||||||||||||||||
14 | JIKO GLASS | 29.00 | 29.00 | 0.00 | 29.00 | 0.00 | ||||||||||||||||
15 | JIKO BATI | 39.00 | 39.00 | 0.00 | 39.00 | 0.00 | ||||||||||||||||
16 | JIKO NIKAI | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | ||||||||||||||||
17 | LIGHTER GAS - ECO | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | ||||||||||||||||
18 | REGULATOR - ADENT - 06KG | 9.00 | 9.00 | 0.00 | 9.00 | 0.00 | ||||||||||||||||
19 | REGULATOR - ADENT - 15KG | 84.00 | 84.00 | 0.00 | 84.00 | 0.00 | ||||||||||||||||
20 | REGULATOR - IGT 38KG | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | ||||||||||||||||
21 | REGULATOR - IGT 15KG GAUGE | 5.00 | 5.00 | 0.00 | 5.00 | 0.00 | ||||||||||||||||
22 | TRIVET KAWAIDA | 869.00 | 719.00 | 0.00 | 30.00 | 20.00 | 30.00 | 50.00 | 20.00 | 869.00 | 0.00 | |||||||||||
23 | TRIVET - CHUMA | 4.00 | 4.00 | 0.00 | 4.00 | 0.00 | ||||||||||||||||
24 | ||||||||||||||||||||||
07.01 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
S3:S23 | S3 | =+C3+E3-F3 |
T3:T23 | T3 | =SUM(D3,G3,H3,I3,J3,L3,K3,M3,N3,O3,P3,Q3,R3)-SUM(C3,E3-F3)+E3 |
D3:D23 | D3 | =C3+E3-F3-G3-H3-I3-J3-L3-M3-N3-O3-P3-K3-Q3 |
F3 | F3 | =SUMIF(C26:C129,B3,D26:D129) |
F4 | F4 | =SUMIF(C26:C129,B4,D26:D129) |
F5 | F5 | =SUMIF(C26:C129,B5,D26:D129) |
F6 | F6 | =SUMIF(C26:C129,B6,D26:D129) |
F7 | F7 | =SUMIF(C26:C129,B7,D26:D129) |
F8 | F8 | =SUMIF(C26:C129,B8,D26:D129) |
F9 | F9 | =SUMIF(C26:C129,B9,D26:D129) |
F10 | F10 | =SUMIF(C26:C129,B10,D26:D129) |
F11 | F11 | =SUMIF(C26:C129,B11,D26:D129) |
F12 | F12 | =SUMIF(C26:C129,B12,D26:D129) |
F13 | F13 | =SUMIF(C26:C129,B13,D26:D129) |
F14 | F14 | =SUMIF(C26:C129,B14,D26:D129) |
F15 | F15 | =SUMIF(C26:C129,B15,D26:D129) |
F16 | F16 | =SUMIF(C26:C129,B16,D26:D129) |
F17 | F17 | =SUMIF(C26:C129,B17,D26:D129) |
F18 | F18 | =SUMIF(C26:C129,B18,D26:D129) |
F19 | F19 | =SUMIF(C26:C129,B19,D26:D129) |
F20 | F20 | =SUMIF(C26:C129,B20,D26:D129) |
F21 | F21 | =SUMIF(C26:C129,B21,D26:D129) |
F22 | F22 | =SUMIF(C26:C129,B22,D26:D129) |
F23 | F23 | =SUMIF(C26:C129,B23,D26:D129) |
Cells with Conditional Formatting | ||||
---|---|---|---|---|
Cell | Condition | Cell Format | Stop If True | |
F3:F23 | Cell Value | =0 | text | NO |
T2:T23 | Cell Value | <0 | text | NO |
T2:T23 | Cell Value | >0 | text | NO |