New filters on the Home Feed, take a look!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

1
Return multiple values based on multiple conditions
Post Body

Hi,

Im trying to create a formula where based on partial text it would return value but can't get anything to work properly :D. I have a 2 column table (multiple rows), column 1 has text and values and column 2 is to be filled. Text in column 1 varies but has specific text (partial) based on which I input value into column 2. That is:

1234 NL 5678 Netherlands
12 UK 3456 United Kindgom
DE 12345678 Germany
1122 PT 3344 Portugal

Based on above example, I would like to input formula in 2nd column which would search column 1 for specific text and return specific values in column 2. I have 10 conditions total which have 10 corresponding values to return. Text/numbers that come before and after searched text are irrelevant but searched text is not always in same spot so cannot use something like LEFT/RIGHT formulas (although searched text always is the same, e.g. "NL") I tried to use IF(OR(ISNUMBER(SEARCH, VLOOKUP, INDEX, IFERROR or TEXTJOIN but every one of them works with searching for 1 specific partial text and returns specific value, but I cant manage to nest all 10 into one formula. For VLOOKUP I made 2nd worksheet with table with text/value, but still didnt manage for it to work

Like =IFERROR(VLOOKUP("NL",TAB!A2:B12,2,FALSE),VLOOKUP("UK",TAB!A2:B12,2FALSE)... etc

I wanted for it to remain formula based rather than VBA or other macro oriented

If someone has idea how to get this to work, it would be much appreciated.

Author
Account Strength
90%
Account Age
9 years
Verified Email
Yes
Verified Flair
No
Total Karma
1,557
Link Karma
13
Comment Karma
1,501
Profile updated: 2 days ago
Posts updated: 1 month ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
2 years ago