abdo meghari
Well-known Member
- Joined
- Aug 3, 2021
- Messages
- 612
- Office Version
- 2019
Hello
I'm not sure if could be by macro , but what I want if the item in column B contains R & number like this 700R16 or 195R15C or 29.5R25** VSDL as bold after R letter then should add element (TIRES) in adjacent cell for column C and if the item in column B contains / then the element in column C should be TIRES and if the item in column B contains × & - then the element in column C should be TIRES like this 28×9-15 LO as bold, if the item in column B contains number & letter A then the element in column C should be BATTERY like this 70A R OR 74A L or 100A as bold, if if the item in column B contains number & × & number & L then the element in column C should be OIL like this PP MEG 24KG 4×5L or CYU MEG 4×4L as bold .
[
result
should be clear data in second sheet from row 2 before bring data . if it's impossible by macro or any suggestion to make easy things I accept that or formula
thanks
I'm not sure if could be by macro , but what I want if the item in column B contains R & number like this 700R16 or 195R15C or 29.5R25** VSDL as bold after R letter then should add element (TIRES) in adjacent cell for column C and if the item in column B contains / then the element in column C should be TIRES and if the item in column B contains × & - then the element in column C should be TIRES like this 28×9-15 LO as bold, if the item in column B contains number & letter A then the element in column C should be BATTERY like this 70A R OR 74A L or 100A as bold, if if the item in column B contains number & × & number & L then the element in column C should be OIL like this PP MEG 24KG 4×5L or CYU MEG 4×4L as bold .
[
CC1.xlsm | |||||||
---|---|---|---|---|---|---|---|
A | B | C | D | E | |||
1 | ITEM | BATCH | QTY | PRICE | TOTAL | ||
2 | 1 | 235/60R18 | 4.00 | LYD 425.00 | LYD 1,700.00 | ||
3 | 2 | 750R16 L50 | 2.00 | LYD 400.00 | LYD 800.00 | ||
4 | 3 | 700R16 | 7.00 | LYD 800.00 | LYD 5,600.00 | ||
5 | 4 | 215/65R16 | 4.00 | LYD 355.00 | LYD 1,420.00 | ||
6 | 5 | 265/70R16 | 5.00 | LYD 550.00 | LYD 2,750.00 | ||
7 | 6 | 29.5R25** VSDL | 24.00 | LYD 385.00 | LYD 9,240.00 | ||
8 | 7 | 265/60R18 | 4.00 | LYD 540.00 | LYD 2,160.00 | ||
9 | 8 | 225/75R15 | 1.00 | LYD 340.00 | LYD 340.00 | ||
10 | 9 | 275/50R21 | 4.00 | LYD 780.00 | LYD 3,120.00 | ||
11 | 10 | 265/65R17 | 5.00 | LYD 700.00 | LYD 3,500.00 | ||
12 | 11 | 195R15C | 5.00 | LYD 600.00 | LYD 3,000.00 | ||
13 | 12 | 18.4/15-30-20 | 4.00 | LYD 310.00 | LYD 1,240.00 | ||
14 | 13 | 28×9-15 LO | 2.00 | LYD 580.00 | LYD 1,160.00 | ||
15 | 14 | 70A R | 10.00 | LYD 405.00 | LYD 4,050.00 | ||
16 | 15 | 60A | 10.00 | LYD 335.00 | LYD 3,350.00 | ||
17 | 16 | 90A | 6.00 | LYD 470.00 | LYD 2,820.00 | ||
18 | 17 | 74A L | 4.00 | LYD 310.00 | LYD 1,240.00 | ||
19 | 18 | 100A | 3.00 | LYD 490.00 | LYD 1,470.00 | ||
20 | 19 | 150A | 4.00 | LYD 650.00 | LYD 2,600.00 | ||
21 | 20 | 120A | 2.00 | LYD 565.00 | LYD 1,130.00 | ||
22 | 21 | 23.5R25 18.4-30 | 1.00 | LYD 385.00 | LYD 385.00 | ||
23 | 22 | PP MEG 24KG 4×5L | 21.00 | LYD 40.00 | LYD 840.00 | ||
24 | 23 | CYU MEG 4×4L | 24.00 | LYD 50.00 | LYD 1,200.00 | ||
25 | TOTAL | LYD 55,115.00 | |||||
combined |
Cell Formulas | ||
---|---|---|
Range | Formula | |
E2:E24 | E2 | =C2*D2 |
E25 | E25 | =SUM(E2:E24) |
result
CC1.xlsm | ||||||||
---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | |||
1 | ITEM | BATCH | GROUP | QTY | PRICE | TOTAL | ||
2 | 1 | 235/60R18 | TIRES | 4.00 | LYD 425.00 | LYD 1,700.00 | ||
3 | 2 | 750R16 L50 | TIRES | 2.00 | LYD 400.00 | LYD 800.00 | ||
4 | 3 | 700R16 | TIRES | 7.00 | LYD 800.00 | LYD 5,600.00 | ||
5 | 4 | 215/65R16 | TIRES | 4.00 | LYD 355.00 | LYD 1,420.00 | ||
6 | 5 | 265/70R16 | TIRES | 5.00 | LYD 550.00 | LYD 2,750.00 | ||
7 | 6 | 29.5R25** VSDL | TIRES | 24.00 | LYD 385.00 | LYD 9,240.00 | ||
8 | 7 | 265/60R18 | TIRES | 4.00 | LYD 540.00 | LYD 2,160.00 | ||
9 | 8 | 225/75R15 | TIRES | 1.00 | LYD 340.00 | LYD 340.00 | ||
10 | 9 | 275/50R21 | TIRES | 4.00 | LYD 780.00 | LYD 3,120.00 | ||
11 | 10 | 265/65R17 | TIRES | 5.00 | LYD 700.00 | LYD 3,500.00 | ||
12 | 11 | 195R15C | TIRES | 5.00 | LYD 600.00 | LYD 3,000.00 | ||
13 | 12 | 18.4/15-30-20 | TIRES | 4.00 | LYD 310.00 | LYD 1,240.00 | ||
14 | 13 | 28×9-15 LO | TIRES | 2.00 | LYD 580.00 | LYD 1,160.00 | ||
15 | 14 | 70A R | BATTERY | 10.00 | LYD 405.00 | LYD 4,050.00 | ||
16 | 15 | 60A | BATTERY | 10.00 | LYD 335.00 | LYD 3,350.00 | ||
17 | 16 | 90A | BATTERY | 6.00 | LYD 470.00 | LYD 2,820.00 | ||
18 | 17 | 74A L | BATTERY | 4.00 | LYD 310.00 | LYD 1,240.00 | ||
19 | 18 | 100A | BATTERY | 3.00 | LYD 490.00 | LYD 1,470.00 | ||
20 | 19 | 150A | BATTERY | 4.00 | LYD 650.00 | LYD 2,600.00 | ||
21 | 20 | 120A | BATTERY | 2.00 | LYD 565.00 | LYD 1,130.00 | ||
22 | 21 | 23.5R25 18.4-30 | TIRES | 1.00 | LYD 385.00 | LYD 385.00 | ||
23 | 22 | PP MEG 24KG 4×5L | OIL | 21.00 | LYD 40.00 | LYD 840.00 | ||
24 | 23 | CYU MEG 4×4L | OIL | 24.00 | LYD 50.00 | LYD 1,200.00 | ||
25 | TOTAL | LYD 55,115.00 | ||||||
EXPECTED |
Cell Formulas | ||
---|---|---|
Range | Formula | |
F2:F24 | F2 | =D2*E2 |
F25 | F25 | =SUM(F2:F24) |
should be clear data in second sheet from row 2 before bring data . if it's impossible by macro or any suggestion to make easy things I accept that or formula
thanks