Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default Search text within cell

I want to set up a formula that will search for multiple values within
a cell, and then return a value according to the findings.

For example

3 cells may contain the following text:-

B1: Applicants and accepted applicants data for applicants from the
North East of England 1999-2004 entry.

B2: 2005 NMAS application data at King's College London.

B3: sit reps and possibly apptrack

My formula needs to search all cells, for all those that contain NMAS
and/or GTTR and/or sit rep the cell result needs to display C. If it
doesn't contain any of the above terms, then the cell result is blank.

Can anyone help?

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Search text within cell

On 21 Jul 2006 02:11:02 -0700, "
wrote:

I want to set up a formula that will search for multiple values within
a cell, and then return a value according to the findings.

For example

3 cells may contain the following text:-

B1: Applicants and accepted applicants data for applicants from the
North East of England 1999-2004 entry.

B2: 2005 NMAS application data at King's College London.

B3: sit reps and possibly apptrack

My formula needs to search all cells, for all those that contain NMAS
and/or GTTR and/or sit rep the cell result needs to display C. If it
doesn't contain any of the above terms, then the cell result is blank.

Can anyone help?


Here's one way:

Download and install Longre's free morefunc.xll add-in from
http://xcell05.free.fr

Set up your list of words in a Named Range called WordList.

Use this formula:

=IF(REGEX.COUNT(B1,MCONCAT(WordList,"|"))0,"C","" )


--ron
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,118
Default Search text within cell

Perhaps something like this:

Using your text samples in B1:B3

C1: =IF(SUMPRODUCT(COUNTIF(B1,"*"&{"NMAS","GTTR","sit rep"}&"*")),"C","")
Copy that formula down as far as you need

OR...if you have many items to match...

E1: NMAS
E2: GTTR
E3: sit rep

C1: =IF(SUMPRODUCT(COUNTIF(B1,"*"&$E$1:$E$3&"*")),"C", "")
(adjust the list and range references to suit your situation.)

Does that help?
***********
Regards,
Ron

XL2002, WinXP


" wrote:

I want to set up a formula that will search for multiple values within
a cell, and then return a value according to the findings.

For example

3 cells may contain the following text:-

B1: Applicants and accepted applicants data for applicants from the
North East of England 1999-2004 entry.

B2: 2005 NMAS application data at King's College London.

B3: sit reps and possibly apptrack

My formula needs to search all cells, for all those that contain NMAS
and/or GTTR and/or sit rep the cell result needs to display C. If it
doesn't contain any of the above terms, then the cell result is blank.

Can anyone help?


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
Why am I getting XXX error in text cell with word wrap turned on? HMF Excel Discussion (Misc queries) 2 March 16th 06 12:44 AM
Text in formula bar is not displaying in cell Mike Excel Discussion (Misc queries) 0 August 29th 05 09:47 PM
Possible Lookup Table Karen Excel Worksheet Functions 5 June 8th 05 09:43 PM
how to hyperlink text to a cell steve New Users to Excel 1 December 14th 04 08:21 PM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM


All times are GMT +1. The time now is 06:40 AM.

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"