Color cell range based on text in another cell?

Eric Livesay

Board Regular
Joined
Feb 13, 2008
Messages
127
Hello,

I'm pretty sure this is a simple answer but I can't figure it out.

I would like to color cells A7:F7 a certain color if cell G7 has an "X" in it.

I assume it's using Conditional Fomatting with the Use Formulas rule.


Thanks in advance!
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Hello,

I'm pretty sure this is a simple answer but I can't figure it out.

I would like to color cells A7:F7 a certain color if cell G7 has an "X" in it.

I assume it's using Conditional Fomatting with the Use Formulas rule.


Thanks in advance!
Yes, that's what you want to do.

Select the *entire* range A7:F7 starting from cell A7. Cell A7 will be the
active cell. The active cell is the one cell in the selected range that is not shaded. The formula will be relative to the active cell.

  • Goto the Home tab>Styles>Conditional Formatting>Manage rules>New rule>Use a formula to determine which cells to format
  • Enter this formula in the box below:
  • =$G$7="x"
  • Click the Format button
  • Select the desired style(s)
  • OK out
 
Upvote 0
Yes Conditional formatting is the way to go for this.

Highlight cells A7:F7
Under Conditional Formatting select New Rule.
Select "Use a formula to determine cells to format"
In the Rule Description box enter the formula...
Code:
if($G$7="x",true,false)

Click the Format button to select the color to fill..click OK
 
Upvote 0

Forum statistics

Threads
1,224,562
Messages
6,179,526
Members
452,923
Latest member
JackiG

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