I have a simple problem that I hope to resolve with a pretty simple Excel function.
I have a list with multiple rows (all in one column) containing attributes and their corresponding values, each being separated with a |. It basically looks like this:
Color:Red|Size:M|COD:United States|Price:50.84
Color:Blue|Category:Jeans|COD:China|Price:29.95
Now, I want to extract the strings after each attribute in a separate column and only fill the column if a value exists. In the end it should look like this:
| LONGFORM | Color | Size | Category | COD | Price |
|---|---|---|---|---|---|
| Color:... | Red | M | United States | 50.84 | |
| Color:... | Second | Jeans | China | 29.95 |
I have found a solution to use following code, but it only works for the first column:
=TEIL(LEFT($A2;MID("|";$A2)-1);FIND(B$1;$A2)+1+LEN(B$1);LEN($A2))
If you know a VBA solution to solve it, it's also appreciated!


