abdo meghari
Well-known Member
- Joined
- Aug 3, 2021
- Messages
- 612
- Office Version
- 2019
Hi guys
I need macro to deal with two last columns ARRIVED & SALES , should clear cells contents except formulas in TTL row and STOCK column
every time I will add new three columns ARRIVED , SALES & STOCK , so should search for headers ARRIVED , SALES in last two columns and clear cells contents except formulas .
data
result
I need macro to deal with two last columns ARRIVED & SALES , should clear cells contents except formulas in TTL row and STOCK column
every time I will add new three columns ARRIVED , SALES & STOCK , so should search for headers ARRIVED , SALES in last two columns and clear cells contents except formulas .
data
TIRES REPORT.xlsm | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | |||
1 | ||||||||||||||||||
2 | Category | Size | Pattern | Origin | Arrived | Sales | Stock | Arrived | Sales | Stock | Arrived | Sales | Stock | Arrived | Sales | Stock | ||
3 | PSR (LRD) | 175/70R13 | B25 | INDO | 200 | 16 | 184 | 0 | 5 | 179 | 179 | 179 | ||||||
4 | 175/70R13 | EP150 | THI | 0 | 0 | 0 | 0 | 0 | 10 | 10 | 10 | |||||||
5 | 185/70R13 | EP150 | INDO | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |||||||
6 | 175/65R14 | EP150 | INDO | 20 | 0 | 20 | 10 | 0 | 30 | 30 | 30 | |||||||
7 | 175/70R14 | EP150 | THI | 30 | 0 | 30 | 0 | 0 | 0 | 0 | 0 | |||||||
8 | 175/70R14 | MY02 | THI | 110 | 0 | 110 | 0 | 5 | 105 | 110 | 215 | 110 | 325 | |||||
9 | 185/65R14 | TEC | THI | 120 | 0 | 120 | 0 | 0 | 120 | 120 | 120 | |||||||
10 | 185/65R14 | EP150 | INDO | 200 | 0 | 200 | 22 | 3 | 219 | 219 | 219 | |||||||
11 | 185/65R15 | B250 | JAP | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |||||||
12 | 195/60R15 | AR20 | INDO | 11 | 0 | 11 | 0 | 0 | 11 | 111 | 2 | 120 | 111 | 2 | 229 | |||
13 | 195/60R15 | EP150 | THI | 22 | 22 | 0 | 0 | 0 | 0 | 0 | 0 | |||||||
14 | 195/60R15 | T001 | JAP | 0 | 0 | 0 | 0 | 0 | 0 | 20 | 10 | 10 | 20 | 10 | 20 | |||
15 | 195/60R15 | 150EZ | THI | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |||||||
16 | 195/65R15 | MY02 | THI | 234 | 0 | 234 | 0 | 0 | 234 | 234 | 234 | |||||||
17 | 195/65R15 | EP150 | THI | 444 | 0 | 444 | 0 | 0 | 444 | 444 | 444 | |||||||
18 | 195/65R15 | EP150 | JAP | 44 | 0 | 44 | 0 | 0 | 44 | 3 | 3 | 44 | 3 | 3 | 44 | |||
19 | 195/65R15 | T001 | JAP | 55 | 0 | 55 | 0 | 0 | 55 | 55 | 55 | |||||||
20 | 195/55R16 | EP300 | THI | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |||||||
21 | 205/55R16 | RE003 | THI | 0 | 0 | 0 | 0 | 0 | 0 | 25 | 25 | 0 | 25 | 25 | 0 | |||
22 | 205/65R15 | EP150 | INDO | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |||||||
23 | 205/70R15 | 694 | JAP | 0 | 0 | 0 | 66 | 0 | 66 | 20 | 46 | 20 | 26 | |||||
24 | 225/75R15C | T697 | INDO | 0 | 0 | 0 | 66 | 0 | 66 | 66 | 66 | |||||||
25 | 235/95R15C | D618 | JAP | 0 | 1 | -1 | 0 | 0 | -1 | 22 | 21 | 22 | 43 | |||||
26 | 255/70R15C | D840 | THI | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |||||||
27 | TTL | 1490 | 39 | 1451 | 164 | 13 | 1582 | 291 | 60 | 1813 | 291 | 60 | 2044 | |||||
28 | PSR (HRD) | 215/45R17 | T001 | JAP | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ||||||
29 | 215/50R17 | EP300 | THI | 34 | 0 | 34 | 0 | 0 | 34 | 34 | 34 | |||||||
30 | 215/55R17 | GR90 | INDO | 44 | 0 | 44 | 0 | 0 | 44 | 44 | 44 | |||||||
31 | 285/30R20 | RE0050A | JAP | 0 | 0 | 0 | 0 | 0 | 0 | 12 | 12 | 12 | 24 | |||||
32 | 315/35R20 | SPORT | JAP | 0 | 0 | 0 | 35 | 0 | 35 | 22 | 13 | 20 | -7 | |||||
33 | TTL | 78 | 0 | 78 | 35 | 0 | 113 | 12 | 22 | 103 | 12 | 20 | 95 | |||||
In & Out Balance |
Cell Formulas | ||
---|---|---|
Range | Formula | |
J3,P28:P32,P3:P26,M28:M32,M3:M26,J28:J32,J8:J26,J5:J6 | J3 | =G3+H3-I3 |
E27:P27 | E27 | =SUM(E3:E26) |
G28:G32,G3:G26 | G3 | =E3-F3 |
E33:P33 | E33 | =SUM(E28:E32) |
result
TIRES REPORT.xlsm | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | |||
1 | ||||||||||||||||||
2 | Category | Size | Pattern | Origin | Arrived | Sales | Stock | Arrived | Sales | Stock | Arrived | Sales | Stock | Arrived | Sales | Stock | ||
3 | PSR (LRD) | 175/70R13 | B25 | INDO | 200 | 16 | 184 | 0 | 5 | 179 | 179 | 179 | ||||||
4 | 175/70R13 | EP150 | THI | 0 | 0 | 0 | 0 | 0 | 10 | 10 | 10 | |||||||
5 | 185/70R13 | EP150 | INDO | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |||||||
6 | 175/65R14 | EP150 | INDO | 20 | 0 | 20 | 10 | 0 | 30 | 30 | 30 | |||||||
7 | 175/70R14 | EP150 | THI | 30 | 0 | 30 | 0 | 0 | 0 | 0 | 0 | |||||||
8 | 175/70R14 | MY02 | THI | 110 | 0 | 110 | 0 | 5 | 105 | 110 | 215 | 215 | ||||||
9 | 185/65R14 | TEC | THI | 120 | 0 | 120 | 0 | 0 | 120 | 120 | 120 | |||||||
10 | 185/65R14 | EP150 | INDO | 200 | 0 | 200 | 22 | 3 | 219 | 219 | 219 | |||||||
11 | 185/65R15 | B250 | JAP | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |||||||
12 | 195/60R15 | AR20 | INDO | 11 | 0 | 11 | 0 | 0 | 11 | 111 | 2 | 120 | 120 | |||||
13 | 195/60R15 | EP150 | THI | 22 | 22 | 0 | 0 | 0 | 0 | 0 | 0 | |||||||
14 | 195/60R15 | T001 | JAP | 0 | 0 | 0 | 0 | 0 | 0 | 20 | 10 | 10 | 10 | |||||
15 | 195/60R15 | 150EZ | THI | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |||||||
16 | 195/65R15 | MY02 | THI | 234 | 0 | 234 | 0 | 0 | 234 | 234 | 234 | |||||||
17 | 195/65R15 | EP150 | THI | 444 | 0 | 444 | 0 | 0 | 444 | 444 | 444 | |||||||
18 | 195/65R15 | EP150 | JAP | 44 | 0 | 44 | 0 | 0 | 44 | 3 | 3 | 44 | 44 | |||||
19 | 195/65R15 | T001 | JAP | 55 | 0 | 55 | 0 | 0 | 55 | 55 | 55 | |||||||
20 | 195/55R16 | EP300 | THI | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |||||||
21 | 205/55R16 | RE003 | THI | 0 | 0 | 0 | 0 | 0 | 0 | 25 | 25 | 0 | 0 | |||||
22 | 205/65R15 | EP150 | INDO | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |||||||
23 | 205/70R15 | 694 | JAP | 0 | 0 | 0 | 66 | 0 | 66 | 20 | 46 | 46 | ||||||
24 | 225/75R15C | T697 | INDO | 0 | 0 | 0 | 66 | 0 | 66 | 66 | 66 | |||||||
25 | 235/95R15C | D618 | JAP | 0 | 1 | -1 | 0 | 0 | -1 | 22 | 21 | 21 | ||||||
26 | 255/70R15C | D840 | THI | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |||||||
27 | TTL | 1490 | 39 | 1451 | 164 | 13 | 1582 | 291 | 60 | 1813 | 0 | 0 | 1813 | |||||
28 | PSR (HRD) | 215/45R17 | T001 | JAP | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ||||||
29 | 215/50R17 | EP300 | THI | 34 | 0 | 34 | 0 | 0 | 34 | 34 | 34 | |||||||
30 | 215/55R17 | GR90 | INDO | 44 | 0 | 44 | 0 | 0 | 44 | 44 | 44 | |||||||
31 | 285/30R20 | RE0050A | JAP | 0 | 0 | 0 | 0 | 0 | 0 | 12 | 12 | 12 | ||||||
32 | 315/35R20 | SPORT | JAP | 0 | 0 | 0 | 35 | 0 | 35 | 22 | 13 | 13 | ||||||
33 | TTL | 78 | 0 | 78 | 35 | 0 | 113 | 12 | 22 | 103 | 0 | 0 | 103 | |||||
In & Out Balance |
Cell Formulas | ||
---|---|---|
Range | Formula | |
J3,P28:P32,P3:P26,M28:M32,M3:M26,J28:J32,J8:J26,J5:J6 | J3 | =G3+H3-I3 |
E27:P27 | E27 | =SUM(E3:E26) |
G28:G32,G3:G26 | G3 | =E3-F3 |
E33:P33 | E33 | =SUM(E28:E32) |
Last edited: