ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Conditional Formatting based on Text within Text (https://www.excelbanter.com/excel-discussion-misc-queries/24975-conditional-formatting-based-text-within-text.html)

George Lynch

Conditional Formatting based on Text within Text
 
I need to create a conditional format based on a text string that will be
contained in a larger text string within the active cell. I know I can use
either the SEARCH or FIND function to determine if a text string is contained
within a larger string, but those functions require a cell address and I
don't know how to apply them to the current cell address, whatever it might
be.

So, for example, if the text string is "needs training", and the text in
cell A5 is "George has had some exposure to the app, but he needs training",
then I would want that cell to apply a conditional format because the phrase
"needs training" is contained in the cell.

Thanks in advance for any advice on this...

PegL

use the first cell select. So if you select all of column A, use A1. If you
select A2:A500, use A2.

"George Lynch" wrote:

I need to create a conditional format based on a text string that will be
contained in a larger text string within the active cell. I know I can use
either the SEARCH or FIND function to determine if a text string is contained
within a larger string, but those functions require a cell address and I
don't know how to apply them to the current cell address, whatever it might
be.

So, for example, if the text string is "needs training", and the text in
cell A5 is "George has had some exposure to the app, but he needs training",
then I would want that cell to apply a conditional format because the phrase
"needs training" is contained in the cell.

Thanks in advance for any advice on this...


JE McGimpsey

One way:

Select A5. Choose Format/Conditional Formatting...

CF1: Formula is =COUNTIF(A5,"*needs training*")
Format1: <your format here

In article ,
George Lynch wrote:

I need to create a conditional format based on a text string that will be
contained in a larger text string within the active cell. I know I can use
either the SEARCH or FIND function to determine if a text string is contained
within a larger string, but those functions require a cell address and I
don't know how to apply them to the current cell address, whatever it might
be.

So, for example, if the text string is "needs training", and the text in
cell A5 is "George has had some exposure to the app, but he needs training",
then I would want that cell to apply a conditional format because the phrase
"needs training" is contained in the cell.

Thanks in advance for any advice on this...


George Lynch

Hi Peg,

Thank you for your suggestion. Works perfectly.

George

"PegL" wrote:

use the first cell select. So if you select all of column A, use A1. If you
select A2:A500, use A2.

"George Lynch" wrote:

I need to create a conditional format based on a text string that will be
contained in a larger text string within the active cell. I know I can use
either the SEARCH or FIND function to determine if a text string is contained
within a larger string, but those functions require a cell address and I
don't know how to apply them to the current cell address, whatever it might
be.

So, for example, if the text string is "needs training", and the text in
cell A5 is "George has had some exposure to the app, but he needs training",
then I would want that cell to apply a conditional format because the phrase
"needs training" is contained in the cell.

Thanks in advance for any advice on this...



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

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