Conditional formatting for a whole row!

Mr2017

Well-known Member
Joined
Nov 28, 2016
Messages
644
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hi

Does anyone know how to make a whole row red if a certain word appears in a cell?

Please find below a simple example:

The data below covers cells A1:C3 and every cell in that range has a "-" with the exception of cell C2, which has the word "FALSE."

I'd like to make the whole row red (from column A to column C) IF the word "FALSE" appears in a cell in that range.

I've tried to highlight the whole range, then gone to Conditional formatting and selected "use a formula to determine which cells to format" but I'm not sure what formula should be used in this instance.

Thanks in advance.

[TABLE="width: 192"]
<colgroup><col width="64" span="3" style="width:48pt"> </colgroup><tbody>[TR]
[TD="width: 64"]-[/TD]
[TD="width: 64"]-[/TD]
[TD="width: 64"]-[/TD]
[/TR]
[TR]
[TD]-[/TD]
[TD]-[/TD]
[TD="align: center"]FALSE[/TD]
[/TR]
[TR]
[TD]-[/TD]
[TD]-[/TD]
[TD]-[/TD]
[/TR]
</tbody>[/TABLE]
 
Ok, Thanks for clarifying that as well as the common error users make!

With the simple example I described above, the right range was selected and the first condition works, but not the second. So I’m surprised - there are only two cells in the range (A1 and B2),

Is yhere anything else that you think would need to be corrected, besides changing row 3 to row 1 in thei example?

Please find below the details, for you convenience. I’ll be back online tomorrow. Thanks in advance:

you know why the second condition for this conditional formatting isn't working?

I'm sure it's something simple! There are just two cells in this example: A1 and B1.

The first condition is this if this text ("ERROR: Select a mechanic from the drop-down in the next column") is in cell A1, then A1 and B1 turn RED. And this condition works using a variation of a formula you provided (=COUNTIF($A1:$K1,"ERROR: Select a mechanic from the drop-down in the next column")>0). I selected RED in the formatting of the cell, if this condition is true.

The second condition is that if the ERROR text above is in A1 and the words in B1 are NOT = to "Select a mechanic" then cells A1 and B1 should turn GREEN.

A user has to select an option from a drop-down in cell B1 that uses validation to ensure they choose a valid "mechanic."

The data validation list is in cells E1 and E2 and just has two values: Special Offer" and "Select a mechanic" (also below).

Special Offer
Select a mechanic

So if a user selects "Special Offer" then cells A1 and B1 should turn green, but they're not
turning green?

The conditional formatting formula for them to turn green is =AND($A1=“ERROR: Select a mechanic from the next column",$B1<>"Select a mechanic")
 
Upvote 0

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Please give us an actual example of one that is not working right.
What exactly is in cells A1 and B1?
Is either rule being invoked, returning a color in that instance, or is just nothing happening at all?
 
Upvote 0
In the example above, the first rule works and both cells are red.

The text in cell A1 is

“ERROR: Select a mechanic from the drop-down in the next column"

The conditional formatting rule is

=COUNTIF($A1:$B1,"ERROR: Select a mechanic from the drop-down in the next column")>0) and it formats cells in red if it’s true, which it is.

The second rule (which should change the colour of both cells to green isn’t working).

The text in cell B1 has been changed from “Select a mechanic” to “Special Offer” but the cells (A1 and B1) have not turned green,

That rule is

=AND($A1=“ERROR: Select a mechanic from the next column",$B1<>"Select a mechanic”)
 
Upvote 0
The cells are staying red, right?
That is because your first condition is being met.

So, if you have two Conditional Formatting rules where both could be True at the same time, then you must do the following:
1. Decide which rule takes should take precedence if both rules are True.
2. Move that rule up to the first one listed.
3. Go to the "Rules Manager", and check the "Stop If True" option at the end of the row for rule 1, to ensure that if it is met, it will stop there and not check any conditions after that.
 
Upvote 0

Forum statistics

Threads
1,224,828
Messages
6,181,209
Members
453,022
Latest member
RobertV1609

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