View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
zzxxcc zzxxcc is offline
external usenet poster
 
Posts: 27
Default Search, find or lookup defined text in text string

Maybe we could combine with VLOOKUP and put the FCM, FCN, FCO.... in a table.
I have 12 different "words" to look up.
--
Thanks


"zzxxcc" wrote:

That din't work. The cell contained "......FCO....", but returned "FCM"
--
Thanks


"Toppers" wrote:

Try:

=IF(ISNUMBER(FIND("FCM",B2)),MID(B2,FIND("FCM",B2) ,3),"")

"zzxxcc" wrote:

My data in B2:B1000 contains text and numbers. In D2:D1000 I need to return
the findings of a search in B2. Eksample: The text in B2 is "Add FCM#6". I
want to search B2 for text containing FCM, FCN, FCO, FCP, ect. If I find one
of these combinations I want the found text to be returned in D2. In this
case: "FCM".

I am familiar with: =SEARCH("FCM",B2) - but this only returns the number
"5".
I am familiar with: =MID(B2,5,3) - but the number 5 in the formula is
fixed. Sometimes the text I search starts at position 5, sometimes at pos. 6,
10, 15,...-not fixed.
How can I combine these two functions with OR or some other relevant function?
--
Thanks