Conditional Formatting: format a column if the cell above contains a specific text

ATNCO

New Member
Joined
Oct 12, 2015
Messages
6
I have the table below:
DateProductPrice
01/11/1903

<tbody>
</tbody>
ezf45
03/11/1903

<tbody>
</tbody>
ezffez10
07/11/1903

<tbody>
</tbody>
ae56

<tbody>
</tbody>
and I am trying, using conditional formatting, to format a column if the cell above contains a specific text.
So for example, if in A1 I have "Date", the column below turns red.

I do not know what formula to use in Conditional Formating/New formatting rule/Use a formula to determine which cells to format.

Thank you
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
If the cells are formatted as dates and not that they are strings that look like dates, then

1. Select the column with the data, say A1:A10
2. Go to conditional formatting and new formula and
3. Use a formula like =NOT(ISERR(YEAR(A1))) = TRUE to format cells that contain a date

or like =iserror(Search("txt",A1)) = false to format cells that contain the string "txt"
 
Upvote 0
If the cells are formatted as dates and not that they are strings that look like dates, then

1. Select the column with the data, say A1:A10
2. Go to conditional formatting and new formula and
3. Use a formula like =NOT(ISERR(YEAR(A1))) = TRUE to format cells that contain a date

or like =iserror(Search("txt",A1)) = false to format cells that contain the string "txt"

It works, thank you very much!
 
Upvote 0

Forum statistics

Threads
1,215,537
Messages
6,125,393
Members
449,222
Latest member
taner zz

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top