Color row cells if conditions met

artz

Well-known Member
Joined
Aug 11, 2002
Messages
830
Office Version
  1. 2016
Platform
  1. Windows
Hi,

I have a worksheet that I want to apply conditional formatting to. The condition is that if there is a "Yes" in a cell in column G, that particular row from column A to G would be highlighted in light green.

Is there a way to do this without using VBA? If not, could someone in the Forum suggest some code to do this?

Thanks,

Art
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Select A2:G till last row. (Not whole columns because CF is very heavy for your system.)
Make in CF a new rule with: $G2="Yes"
 
Upvote 0
Hi mart37,

I selected cells A2:G45. From the CF menus I picked: New Rule. From that dropdown I selected "Use a formula to determine which cells to format." Next I added your formula $G2="Yes". I used the format button to select a color. Then clicked OK.

This did not apply color to the row where "Yes" was present in cells in column G.

Did I do this correctly?

Thanks,

Art
 
Upvote 0
I selected cells A2:G45. From the CF menus I picked: New Rule. From that dropdown I selected "Use a formula to determine which cells to format." Next I added your formula $G2="Yes". I used the format button to select a color. Then clicked OK.

This did not apply color to the row where "Yes" was present in cells in column G.

Did I do this correctly?
You need to use this formula (note the leading equal sign)...

=$G2="Yes"
 
Upvote 0
Hi Rick,

Thanks for reply and suggestion. The leading equal sign did the trick. :-)

Art
 
Upvote 0

Forum statistics

Threads
1,223,909
Messages
6,175,312
Members
452,634
Latest member
cpostell

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