Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11
Default text filtering formula???

I'm trying to find a formula to search for specific words in a line of text
and show the found word in a single cell.

For example the formula would search for "Joe" and "Mary" and "Steve" in a
single line of text. The text, to be filtered, might be as follows (The
students name is Mary.) The result of the search would have found "Mary" and
now show "Mary" in the cell. If the text to be filtered would have said (The
students name is Steve) the cell would show "Steve".

Does anyone know how to do what I'm trying to do?

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,651
Default text filtering formula???

On Tue, 14 Aug 2007 06:20:02 -0700, Garth
wrote:

I'm trying to find a formula to search for specific words in a line of text
and show the found word in a single cell.

For example the formula would search for "Joe" and "Mary" and "Steve" in a
single line of text. The text, to be filtered, might be as follows (The
students name is Mary.) The result of the search would have found "Mary" and
now show "Mary" in the cell. If the text to be filtered would have said (The
students name is Steve) the cell would show "Steve".

Does anyone know how to do what I'm trying to do?


It's not clear what you are trying to do.

If you are trying to determine if some particular name is in a string, then,
with the name you are looking for in F1, and your line of text in A1, you could
use the following formula:

=IF(ISERR(FIND($F$1,A1)),"",$F$1)

If you are trying to see if any name from a list of names is in the line of
text, then you could use the **array-entered** formula:

=INDEX(NameList,MATCH(FALSE,ISERR(FIND(NameList,A1 )),0))

To **array-enter** a formula, hold down <ctrl<shift while hitting <enter.
Excel will place braces {...} around the formula.

If the name is not present, the second formula will return a #N/A error. If
that is not suitable, you could trap it by nesting the formula in an IF
statement:

e.g.

=IF(ISNA(formula),"Name Not Present", formula)


--ron
Reply
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
Filtering long text Havard Excel Worksheet Functions 3 March 29th 07 08:28 AM
filtering out text from numbers simonsmith Excel Discussion (Misc queries) 4 August 10th 06 02:43 AM
Advanced filtering on text and blanks dtencza Excel Discussion (Misc queries) 4 March 14th 06 01:07 AM
Filtering part of text Happy Excel Discussion (Misc queries) 1 August 17th 05 06:05 AM
Filtering out text with conditional formatting bluebean Excel Discussion (Misc queries) 4 August 5th 05 04:43 PM


All times are GMT +1. The time now is 03:38 PM.

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

About Us

"It's about Microsoft Excel"