airforceone
Board Regular
- Joined
- Feb 14, 2022
- Messages
- 177
- Office Version
- 2019
- 2016
- Platform
- Windows
before posting this question, i read almost all that is related to string extraction procedure but none could ease my weeklong headache
i tried the following formula (Row 9 - 13) and got that so far but what is needed is to scan vitamins (field/column) and separate different Vitamins and ADD the total (Vitamins Type) and SUM for all particular Branch Control Number (BCN) in a row as shown in Row A16
i tried the following formula (Row 9 - 13) and got that so far but what is needed is to scan vitamins (field/column) and separate different Vitamins and ADD the total (Vitamins Type) and SUM for all particular Branch Control Number (BCN) in a row as shown in Row A16
Help Needed.xlsx | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | N | |||
1 | Branch Control Number | Vitamins | ||||||||||||||
2 | A00001-2022-0001 | Vit A Grams : 0.006 Value : 1000 | ||||||||||||||
3 | A00001-2022-0002 | Vit A Grams : 0.006 Value : 1000,Vit B Grams : 0.008 Value : 2000 | ||||||||||||||
4 | A00001-2022-0003 | Vit D Grams : 0.006 Value : 1000,Vit B Grams : 0.008 Value : 2000,Vit C Grams : 0.010 Value : 3002 | ||||||||||||||
5 | A00001-2022-0004 | Zinc Grams : 0.006 Value : 1000,Vit B Grams : 0.008 Value : 2000,Vit D Grams : 0.010 Value : 3003 | ||||||||||||||
6 | A00001-2022-0005 | Vit A Grams : 0.006 Value : 1000,Vit A Grams : 0.5 Value : 600,Zinc Grams : 0.008 Value : 2000,Vit D Grams : 0.010 Value : 3004 | ||||||||||||||
7 | ||||||||||||||||
8 | Tried Formula | RESULT | ||||||||||||||
9 | =IF(ISERR(FIND(",",B6)),B6,MID(B6,FIND(",",B6,1)+1,99)) | Vit A Grams : 0.5 Value : 600,Zinc Grams : 0.008 Value : 2000,Vit D Grams : 0.010 Value : 3004 | ||||||||||||||
10 | =LEFT(B6, SEARCH(",",B6)-1) | Vit A Grams : 0.006 Value : 1000 | ||||||||||||||
11 | =LEFT(F9, SEARCH(",",F9)-1) | Vit A Grams : 0.5 Value : 600 | ||||||||||||||
12 | =IF(ISERR(FIND(",",F9)),F9,MID(F9,FIND(",",F9,1)+1,99)) | Zinc Grams : 0.008 Value : 2000,Vit D Grams : 0.010 Value : 3004 | ||||||||||||||
13 | =RIGHT(F9, SEARCH(",",F9)+2) | Vit D Grams : 0.010 Value : 3004 | ||||||||||||||
14 | ||||||||||||||||
15 | Expected Result | Vit A (2 Entry) | Zinc | Vit D | Total | |||||||||||
16 | A00001-2022-0005 (Row A6) | 0.506 | 0.008 | 0.01 | 0.524 | |||||||||||
17 | ||||||||||||||||
18 | NOTE: | Branch Control Number may contain multiple pack of vitamins (up to 20) | ||||||||||||||
Sheet1 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
F9 | F9 | =IF(ISERR(FIND(",",B6)),B6,MID(B6,FIND(",",B6,1)+1,99)) |
F10 | F10 | =LEFT(B6, SEARCH(",",B6)-1) |
F11 | F11 | =LEFT(F9, SEARCH(",",F9)-1) |
F12 | F12 | =IF(ISERR(FIND(",",F9)),F9,MID(F9,FIND(",",F9,1)+1,99)) |
F13 | F13 | =RIGHT(F9, SEARCH(",",F9)+2) |
B16 | B16 | =0.006+0.5 |
E16 | E16 | =SUM(B16:E16) |