Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 50
Default searching text and conditional format with multple conditions

I am using Excel 2003.

I have a very large file with lots of text. I need to search column C for 9
specific strings of text (they can be anywhere in the cell) and if any one of
these strings are there I would like to format the row a different color.

I set up conditonal formatting with this formula:
=ISNUMBER(SEARCH("vit",$C1))

and it works good. But how do add the or condtion for the other 8 strings
of text?

Thanks,
Diane


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,722
Default searching text and conditional format with multple conditions

=OR(ISNUMBER(SEARCH("vit",$C1)),ISNUMBER(SEARCH("N ext
item",$c1)),ISNUMBEr....etc
--
Best Regards,

Luke M


"diaare" wrote:

I am using Excel 2003.

I have a very large file with lots of text. I need to search column C for 9
specific strings of text (they can be anywhere in the cell) and if any one of
these strings are there I would like to format the row a different color.

I set up conditonal formatting with this formula:
=ISNUMBER(SEARCH("vit",$C1))

and it works good. But how do add the or condtion for the other 8 strings
of text?

Thanks,
Diane


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,118
Default searching text and conditional format with multple conditions

With

H1:H9 containing your list of "search words".
And
C1:C100 containing your cells to test

Try this:
Select C1:C100, with C1 as the active cell

From the Excel Main Menu:
<format<conditional formatting
Condition_1
Formula is: =MAX(INDEX(COUNTIF(C1,"*"&$H$1:$H$9&"*"),0))
Click the [format] button and set your colors.
Click [OK] to finish

That will highlight any cell containing any of the values listed in H1:H9.

Is that something you can work with?
Post back if you have more questions.
--------------------------

Regards,

Ron
Microsoft MVP (Excel)
(XL2003, Win XP)



"diaare" wrote in message
...
I am using Excel 2003.

I have a very large file with lots of text. I need to search column C for
9
specific strings of text (they can be anywhere in the cell) and if any one
of
these strings are there I would like to format the row a different color.

I set up conditonal formatting with this formula:
=ISNUMBER(SEARCH("vit",$C1))

and it works good. But how do add the or condtion for the other 8 strings
of text?

Thanks,
Diane




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 50
Default searching text and conditional format with multple conditions

Thanks so much to both of you.

I ended up going with Ron's so my user has the ability to change the search
terms as needed without editing the formula. I only wish I could reference a
seperate tab in the conditional formating.

Thanks again for all of your help,

Diane

"Ron Coderre" wrote:

With

H1:H9 containing your list of "search words".
And
C1:C100 containing your cells to test

Try this:
Select C1:C100, with C1 as the active cell

From the Excel Main Menu:
<format<conditional formatting
Condition_1
Formula is: =MAX(INDEX(COUNTIF(C1,"*"&$H$1:$H$9&"*"),0))
Click the [format] button and set your colors.
Click [OK] to finish

That will highlight any cell containing any of the values listed in H1:H9.

Is that something you can work with?
Post back if you have more questions.
--------------------------

Regards,

Ron
Microsoft MVP (Excel)
(XL2003, Win XP)



"diaare" wrote in message
...
I am using Excel 2003.

I have a very large file with lots of text. I need to search column C for
9
specific strings of text (they can be anywhere in the cell) and if any one
of
these strings are there I would like to format the row a different color.

I set up conditonal formatting with this formula:
=ISNUMBER(SEARCH("vit",$C1))

and it works good. But how do add the or condtion for the other 8 strings
of text?

Thanks,
Diane





  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,118
Default searching text and conditional format with multple conditions

I only wish I could reference a seperate tab in the conditional
formating. <<


You can!
CF won't work with cell refernces to other sheets,
BUT it will work with Named Ranges that refer to those cells.

If your data is on Sheet3
and
your search list is on Sheet1, H1:H9

Then....assign a Range Name to the search list.

Here's a shortcut way:
Select H1:H9 on Sheet1
In the Name Box (just above the Col_A title):
Type rngMyList
Press [ENTER]

Now switch to Sheet3
Select the CF cells (again, assuming cell C1 is selected)
<format<conditional formatting
Condition_1
Formula is: =MAX(INDEX(COUNTIF(C1,"*"&rngMyList&"*"),0))
Click the [format] button and set your colors.
Click [OK] to finish

Does that help?
Post back if you have more questions.
--------------------------

Regards,

Ron
Microsoft MVP (Excel)
(XL2003, Win XP)



"diaare" wrote in message
...
Thanks so much to both of you.

I ended up going with Ron's so my user has the ability to change the
search
terms as needed without editing the formula. I only wish I could
reference a
seperate tab in the conditional formating.

Thanks again for all of your help,

Diane

"Ron Coderre" wrote:

With

H1:H9 containing your list of "search words".
And
C1:C100 containing your cells to test

Try this:
Select C1:C100, with C1 as the active cell

From the Excel Main Menu:
<format<conditional formatting
Condition_1
Formula is: =MAX(INDEX(COUNTIF(C1,"*"&$H$1:$H$9&"*"),0))
Click the [format] button and set your colors.
Click [OK] to finish

That will highlight any cell containing any of the values listed in
H1:H9.

Is that something you can work with?
Post back if you have more questions.
--------------------------

Regards,

Ron
Microsoft MVP (Excel)
(XL2003, Win XP)



"diaare" wrote in message
...
I am using Excel 2003.

I have a very large file with lots of text. I need to search column C
for
9
specific strings of text (they can be anywhere in the cell) and if any
one
of
these strings are there I would like to format the row a different
color.

I set up conditonal formatting with this formula:
=ISNUMBER(SEARCH("vit",$C1))

and it works good. But how do add the or condtion for the other 8
strings
of text?

Thanks,
Diane







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
Format a text cell for searching DavidM[_2_] Excel Discussion (Misc queries) 1 March 28th 07 03:05 AM
Format a text cell for searching Toppers Excel Discussion (Misc queries) 0 March 28th 07 02:18 AM
Format a text cell for searching DavidM[_2_] Excel Discussion (Misc queries) 0 March 28th 07 01:17 AM
Conditional Format - 3 conditions Mike Saffer Excel Worksheet Functions 3 April 13th 06 07:35 PM
more conditional format conditions rnc Excel Worksheet Functions 5 June 1st 05 11:58 AM


All times are GMT +1. The time now is 05:17 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"