Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11
Default Conditional Formatting based on text?


Is it possible to implement conditional formatting based on text contained
in a cell? Example, user wants to be able to highlight all the cells in a
spreadsheet for a given entity (which will change all the time) so I'm
looking for something like "cell contains xyz" -- but as far as I can tell,
it works only with numeric values.

Am I trying to do something that is impossible?

Thanks in advance.


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,081
Default Conditional Formatting based on text?

Until somebody suggests something a little more polished, use a formula like:

=LEN(E4)=LEN(SUBSTITUTE(E4,"Smith",""))


"KarenH" wrote:


Is it possible to implement conditional formatting based on text contained
in a cell? Example, user wants to be able to highlight all the cells in a
spreadsheet for a given entity (which will change all the time) so I'm
looking for something like "cell contains xyz" -- but as far as I can tell,
it works only with numeric values.

Am I trying to do something that is impossible?

Thanks in advance.


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default Conditional Formatting based on text?

I think you can do conditional formatting, select the "between"
option, and put a in the first cell and z in the second. I just tested
it out and it seems to work even if the cell has multiple letters.
Once I type a number in it the format goes away.

Is that what you were looking for?

-Steven

On Feb 21, 4:10 pm, KarenH wrote:
Is it possible to implement conditional formatting based on text contained
in a cell? Example, user wants to be able to highlight all the cells in a
spreadsheet for a given entity (which will change all the time) so I'm
looking for something like "cell contains xyz" -- but as far as I can tell,
it works only with numeric values.

Am I trying to do something that is impossible?

Thanks in advance.



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 13
Default Conditional Formatting based on text?

Select the whole range, or even the whole row(s) or column(s) where you want
this conditional formatting, then do Format/Conditional Formatting.

In the upper let corner of the dialog box, change "Cell Value Is" to
"Formula Is". Now it expects a formula which evaluates to TRUE or FALSE
(although non-zero and zero will do). Any cell references in the formula are
subject to absolute and relative addressing, so if you chose all of Column A,
the formula should be:

=FIND("xyz",A1) 0

Then, if you select cell A2 and do Format/Conditional Formatting, you'll find:

=FIND("xyz",A2) 0

and so on for A3, A4, etc.
--

--Andy Smith



"KarenH" wrote:


Is it possible to implement conditional formatting based on text contained
in a cell? Example, user wants to be able to highlight all the cells in a
spreadsheet for a given entity (which will change all the time) so I'm
looking for something like "cell contains xyz" -- but as far as I can tell,
it works only with numeric values.

Am I trying to do something that is impossible?

Thanks in advance.


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 138
Default Conditional Formatting based on text?

I think Andy's solution is the way to go. Only 2 additions:

1) since the OP mentioned that the text changes all the time, it would be
better not to hard code it into the condition. Assuming that D1 contains the
text the formula would be =FIND($D$1,A1) 0 or just =FIND($D$1,A1)

2) If the texts should match exactly the formula =$D$1=A1 could be used
(first '=' identifies the following stuff as a formula and D1=A1 is a valid
formula, resulting either in TRUE or FALSE)

Joerg

"Andy Smith" wrote in message
...
Select the whole range, or even the whole row(s) or column(s) where you

want
this conditional formatting, then do Format/Conditional Formatting.

In the upper let corner of the dialog box, change "Cell Value Is" to
"Formula Is". Now it expects a formula which evaluates to TRUE or FALSE
(although non-zero and zero will do). Any cell references in the formula

are
subject to absolute and relative addressing, so if you chose all of Column

A,
the formula should be:

=FIND("xyz",A1) 0

Then, if you select cell A2 and do Format/Conditional Formatting, you'll

find:

=FIND("xyz",A2) 0

and so on for A3, A4, etc.
--

--Andy Smith



"KarenH" wrote:


Is it possible to implement conditional formatting based on text

contained
in a cell? Example, user wants to be able to highlight all the cells in

a
spreadsheet for a given entity (which will change all the time) so I'm
looking for something like "cell contains xyz" -- but as far as I can

tell,
it works only with numeric values.

Am I trying to do something that is impossible?

Thanks in advance.




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
Conditional Formatting based on text within a cell w/ text AND num Shirley Excel Worksheet Functions 2 December 22nd 06 01:40 AM
Conditional formatting based on text within a formula Sarah Jane Excel Worksheet Functions 13 October 12th 06 04:12 PM
Conditional formatting of an entire row based on a cell text entry Gilles Desjardins Excel Discussion (Misc queries) 2 December 22nd 05 11:48 AM
Conditional Formatting based on Text within Text George Lynch Excel Discussion (Misc queries) 3 May 5th 05 07:58 PM
Conditional formatting based on text Gilles Desjardins Excel Worksheet Functions 8 February 16th 05 10:45 PM


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