LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 27
Default Search, find or lookup defined text in text string

I'm sorry, Ron. This returns #N/A where it should return: FCM. However, I
think you are on to something.

--
Thanks


"Ron Rosenfeld" wrote:

On Thu, 6 Sep 2007 03:14:15 -0700, 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?


Try this:

In some area on your worksheet, enter in separate cells the text strings you
are searching for. NAME that range "TextStrings".

Then, enter this formula in D2:

=INDEX(TextStrings,MATCH(TRUE,COUNTIF(B2,"*"&TextS trings&"*")0,0))

When you ENTER this formula, you must hold down <ctrl<shift while hitting
<enter as this is an ARRAY formula. Excel will place braces {...} around the
formula.

Then fill down to D1000.
--ron

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
lookup or find matching number in text string mmanis Excel Worksheet Functions 3 October 3rd 07 03:59 PM
search for date in long string of text ryan00davis Excel Discussion (Misc queries) 4 August 11th 06 07:06 PM
How do I do a multiple search using key words in a text string patricia tipp Excel Discussion (Misc queries) 1 February 28th 06 05:01 PM
can you find specific text in a string ignoring any other text chriscp Excel Discussion (Misc queries) 1 September 18th 05 09:54 PM
Newbie: How to search a text string from right Frank Krogh Excel Worksheet Functions 5 November 26th 04 07:16 PM


All times are GMT +1. The time now is 08:49 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"