Hi everyone.
I have a list of sentences in a column.
I need to check for particular strings within those sentences.
Depending on the string I find in each sentence (each sentence only has one of the strings I'm searching, I just don't know which) I want the cell with the formula to return a given second string.
With an example it's easier to explain:
Sentences
========
The quick brown fox jumps over the lazy dog
To be or not to be that is the question
Are you talking to me?
Strings to be searched within the sentences | Second strings to be returned if the the string is found within the sentences
(different strings might return the same value, although not on this example)
====================================================================
brown | Test sentence
question | Shakespeare
talking | Taxi Driver
I'm using, and it works, nested IFs. But it's far from elegant or easy to maintain:
=IF(ISNUMBER(FIND("brown";A1));"Test sentence";IF(ISNUMBER(FIND("question";A1));"Shakespeare";... and so on
How can I make this more elegant and using a list of strings to be searched + corresponding second strings to be returned?
Thank you in advance for you time.
Bookmarks