Nested formula to search a text string and return specific tex
You're welcome. Thanks for the feedback!
--
Biff
Microsoft Excel MVP
"Barbie" wrote in message
...
Thank you for this suggestion. I tried the array approach first, and that
worked, but out of curiosity, I tried your approach, too. It also worked
like
a charm. It's good to know there are multiple ways to skin a cat! Thanks
so
much!
"T. Valko" wrote:
Make a list of the 24 languages. If you have variations of a single
language
like with your Chineses example, sort this list in ascending order. For
example:
H1: Chinese
H2: Chinese Simplified
H3: Chinese Traditional
Let's assume we have these text strings:
A1: This is Chinese Traditional
A2: Plain old Chinese
A3: Chinese Simplified is next
Enter this formula in B1 and copy down to B3:
=LOOKUP(1E+100,SEARCH(H$1:H$3,A1),H$1:H$3)
--
Biff
Microsoft Excel MVP
"Barbie" wrote in message
...
Hello.
I have a large spreadsheet that lists many text strings in a single
column.
The text strings include the name of a company, product, platform, and
language. I would like to isolate the language from the text string and
populate the cells in another column with only the name of that
language.
The
text string does not follow a consistent format where there are the
same
number of words or where the language is always in the same position in
the
sequence. There are 24 different languages that are used in the text
strings,
and some of the languages are more than one word, such as "Chinese
Traditional" or "Chinese Simplified."
Using the formula =IF(SEARCH("German",D44),"German") works if the word
German is part of the text string in cell D44. However, I need to be
able
to
add all of the other languages into a single formula to verify line by
line
what language is in the text string.
When I try to add other languages to the formula, such as
=IF(SEARCH("German",D44),"German"),IF(SEARCH("Dani sh",D44),"Danish"),
the
result is #VALUE!, which is not what I want.
Can this be accomplished through a formula, and if so, how? Would it
work
better to set this up as a macro? If so, any guidance on how to do that
would
be much appreciated.
Thank you!
|