ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   formula to find cell values containing X (https://www.excelbanter.com/excel-discussion-misc-queries/239068-formula-find-cell-values-containing-x.html)

Melissa

formula to find cell values containing X
 
I would like to use conditional formatting to highlight cells containing a
particular word. Is there a formula I can use in the Conditional Formatting
dialog box?

Jacob Skaria

formula to find cell values containing X
 
Hi Melissa

1. Select the cell/Range
2. From menu FormatConditional Formatting
3. For Condition1Select 'Formula Is' and enter the below formula

(For whole content of the cell)
=H1="x"

('x' within the cell content )
=ISERROR(SEARCH("x",I1))=FALSE

4. Click Format ButtonPattern and select your color (say Red)
5. Hit OK

If this post helps click Yes
---------------
Jacob Skaria


"Melissa" wrote:

I would like to use conditional formatting to highlight cells containing a
particular word. Is there a formula I can use in the Conditional Formatting
dialog box?


T. Valko

formula to find cell values containing X
 
('x' within the cell content )
=ISERROR(SEARCH("x",I1))=FALSE


You can reduce that to:

=SEARCH("x",I1)

It'll evaluate to either the error #VALUE! or a number from 1 to LEN(I1).

When it evals as an error the format won't be applied. When it evals as *any
number other than 0* the format will be applied.

In logical tests Excel evaluates 0 as FALSE and *any number other than 0* as
TRUE.

--
Biff
Microsoft Excel MVP


"Jacob Skaria" wrote in message
...
Hi Melissa

1. Select the cell/Range
2. From menu FormatConditional Formatting
3. For Condition1Select 'Formula Is' and enter the below formula

(For whole content of the cell)
=H1="x"

('x' within the cell content )
=ISERROR(SEARCH("x",I1))=FALSE

4. Click Format ButtonPattern and select your color (say Red)
5. Hit OK

If this post helps click Yes
---------------
Jacob Skaria


"Melissa" wrote:

I would like to use conditional formatting to highlight cells containing
a
particular word. Is there a formula I can use in the Conditional
Formatting
dialog box?





All times are GMT +1. The time now is 02:21 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com