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:[TABLE="width: 500"]
<tbody>[TR]
[TD]Date[/TD]
[TD]Product[/TD]
[TD]Price[/TD]
[/TR]
[TR]
[TD][TABLE="width: 75"]
<tbody>[TR]
[TD="class: xl73, width: 75, align: right"]01/11/1903[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]ezf[/TD]
[TD]45[/TD]
[/TR]
[TR]
[TD][TABLE="width: 75"]
<tbody>[TR]
[TD="class: xl73, width: 75, align: right"]03/11/1903[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]ezffez[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD][TABLE="width: 75"]
<tbody>[TR]
[TD="class: xl73, width: 75, align: right"]07/11/1903[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]ae[/TD]
[TD]56[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
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

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
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,223,230
Messages
6,170,883
Members
452,364
Latest member
springate

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