• 409K Members
• 11.2K Online
• 466K Conversations

New Contributor

# Conditional formatting based on values in either of 2 other cells.

I am trying to change the color of cell C if the value in either cell A or cell B = 5.

Thanks for any help!

Kat

5 Replies

# Re: Conditional formatting based on values in either of 2 other cells.

@KatWarren , you may apply to your range (assume starts from C1) conditional formatting rule with formula

=(A1=5)+(B1=5)

# Re: Conditional formatting based on values in either of 2 other cells.

@Sergei BaklanYes, I am applying the range for the entire column.   It is actually more complicated even...  Here is the table... column D indicates the color I need column C.

A          B         C         C

 5 5 25 red 5 4 20 red 5 3 15 red 5 2 10 orange 5 1 5 yellow 4 5 20 red 4 4 16 red 4 3 12 orange 4 2 8 yellow 4 1 4 green 3 5 15 red 3 4 12 red 3 3 9 orange 3 2 6 yellow 3 1 3 green 2 5 10 red 2 4 8 red 2 3 6 orange 2 2 4 green 2 1 2 green 1 5 5 red 1 4 4 orange 1 3 3 yellow 1 2 2 green 1 1 1 green

# Re: Conditional formatting based on values in either of 2 other cells.

Actually, I think I can make this more simple, now that I did that... to just do conditional based on the product...

@KatWarren wrote:

@Sergei BaklanYes, I am applying the range for the entire column.   It is actually more complicated even...  Here is the table... column D indicates the color I need column C.

A          B         C         C

 5 5 25 red 5 4 20 red 5 3 15 red 5 2 10 orange 5 1 5 yellow 4 5 20 red 4 4 16 red 4 3 12 orange 4 2 8 yellow 4 1 4 green 3 5 15 red 3 4 12 red 3 3 9 orange 3 2 6 yellow 3 1 3 green 2 5 10 red 2 4 8 red 2 3 6 orange 2 2 4 green 2 1 2 green 1 5 5 red 1 4 4 orange 1 3 3 yellow 1 2 2 green 1 1 1 green

# Re: Conditional formatting based on values in either of 2 other cells.

@KatWarren , to apply the conditional formatting you need to have some formal logic for such conditions, after that convert it to formulas for the rules. I didn't catch what is the logic here.

# Re: Conditional formatting based on values in either of 2 other cells.

@Sergei BaklanYes.  The more I looked at it, the more I see the lack of pattern.

Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
21 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
flashing a white screen while open new tab
cntvertex in Discussions on
13 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
28 Replies