ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Conditional Format based on sub-string (https://www.excelbanter.com/excel-discussion-misc-queries/226674-conditional-format-based-sub-string.html)

BaseballFan

Conditional Format based on sub-string
 
(Excel 2007) I'd like to conditionally format a range of cells based upon
whether or not a sub-string of text is in a particular cell.

I want to highlight a cell (A1 for formula sake) yellow if the word "Player"
is found in another cell (A2 for formula sake).

Possible A2 cell values could be:
- Major League Player {highlight A1}
- Minor League Player {highlight A1}
- This player is not on a roster {highlight A1}
- No results found {no highlight for A1}

What the exact text of A2 is is not a known or consistent set of
pre-determined text strings. It could be "anything".

Thanks,
Jim

Sheeloo[_5_]

Conditional Format based on sub-string
 

Use in the FORMULA IS
=ISNUMBER(SEARCH("Player",A2))

Use FIND if the case matters...

-------------------------------------
Pl. click ''''Yes'''' if this was helpful...



"BaseballFan" wrote:

(Excel 2007) I'd like to conditionally format a range of cells based upon
whether or not a sub-string of text is in a particular cell.

I want to highlight a cell (A1 for formula sake) yellow if the word "Player"
is found in another cell (A2 for formula sake).

Possible A2 cell values could be:
- Major League Player {highlight A1}
- Minor League Player {highlight A1}
- This player is not on a roster {highlight A1}
- No results found {no highlight for A1}

What the exact text of A2 is is not a known or consistent set of
pre-determined text strings. It could be "anything".

Thanks,
Jim


Per Jessen

Conditional Format based on sub-string
 
Hi

Select A1 and goto Conditional Formatting Condition 1: Formula is Enter
this formula:

=ISERROR(SEARCH("player", A2))=FALSE

Format as desired.

Hopes this helps.

---
Per

"BaseballFan" skrev i meddelelsen
...
(Excel 2007) I'd like to conditionally format a range of cells based upon
whether or not a sub-string of text is in a particular cell.

I want to highlight a cell (A1 for formula sake) yellow if the word
"Player"
is found in another cell (A2 for formula sake).

Possible A2 cell values could be:
- Major League Player {highlight A1}
- Minor League Player {highlight A1}
- This player is not on a roster {highlight A1}
- No results found {no highlight for A1}

What the exact text of A2 is is not a known or consistent set of
pre-determined text strings. It could be "anything".

Thanks,
Jim



BaseballFan

Conditional Format based on sub-string
 
Thanks Per... I chose the first answer, but yours worked as well.

"Per Jessen" wrote:

Hi

Select A1 and goto Conditional Formatting Condition 1: Formula is Enter
this formula:

=ISERROR(SEARCH("player", A2))=FALSE

Format as desired.

Hopes this helps.

---
Per

"BaseballFan" skrev i meddelelsen
...
(Excel 2007) I'd like to conditionally format a range of cells based upon
whether or not a sub-string of text is in a particular cell.

I want to highlight a cell (A1 for formula sake) yellow if the word
"Player"
is found in another cell (A2 for formula sake).

Possible A2 cell values could be:
- Major League Player {highlight A1}
- Minor League Player {highlight A1}
- This player is not on a roster {highlight A1}
- No results found {no highlight for A1}

What the exact text of A2 is is not a known or consistent set of
pre-determined text strings. It could be "anything".

Thanks,
Jim





All times are GMT +1. The time now is 08:17 PM.

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