Conditional formatting only applies to one row

ASH92

New Member
Joined
Jul 26, 2023
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hi all,

I've managed to apply conditional formatting to a whole row $A$2:$J$2 based on the value of $H$2. However I need this to apply to every row in the spreadsheet - please help!

So My H column is a drop down options column, and I want the rows to be highlighted if their H cell has a "YES". Please see the first rule in the screenshot below. As it stands, it only uses and formats the values in row 2, but I want the same rule to apply to each rule (where row 3 would turn green if H3 is YES, etc.)

I'd really appreciate your help!

1690379661104.png
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Welcome to the Board!

You would first select the ENTIRE range to apply it to (i.e. A2:J100000).
Then, in your formulas, make sure that you do NOT lock the row references, so each row will look at the values in the columns in those particular rows, i.e.
the formula:
Excel Formula:
=($H$2="YES")
should just be:
Excel Formula:
=$H2="YES"
(note we removed the "$" before the row number "2").
 
Upvote 1
Solution
Welcome to the Board!

You would first select the ENTIRE range to apply it to (i.e. A2:J100000).
Then, in your formulas, make sure that you do NOT lock the row references, so each row will look at the values in the columns in those particular rows, i.e.
the formula:
Excel Formula:
=($H$2="YES")
should just be:
Excel Formula:
=$H2="YES"
(note we removed the "$" before the row number "2").
Thanks, you absolute legend!

So I highlighted the whole spreadsheet and changed the CF to this:
1690380562318.png


Before this final change, I followed your instruction but had $H2 instead of $H1 and it was highlighting the row above instead of the row with the value for the CF.

It's all now resolved, thanks Joe :)
 
Upvote 0
Thanks, you absolute legend!

So I highlighted the whole spreadsheet and changed the CF to this:
View attachment 95994

Before this final change, I followed your instruction but had $H2 instead of $H1 and it was highlighting the row above instead of the row with the value for the CF.

It's all now resolved, thanks Joe :)
You are welcome.

Yes, the formula you enter has to match the FIRST cell in your applied to range, or else you will be shifted off by a row.
So if the first cell in your applied to range is row 1, then the formula you enter has to reference row 1.
 
Upvote 1

Forum statistics

Threads
1,224,824
Messages
6,181,186
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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