Highlight Cell Question

Closed
DParson55 Posts 5 Registration date Friday January 5, 2018 Status Member Last seen February 14, 2018 - Jan 5, 2018 at 12:04 PM
Mazzaropi Posts 1985 Registration date Monday August 16, 2010 Status Contributor Last seen May 24, 2023 - Jan 5, 2018 at 01:49 PM
Hello,

I am trying to find a way to use conditional formatting on an inventory spreadsheet that I am working on. I would like to highlight cell C3 based on the relationship of the values of A3 and B3.

Example: if the value in A3 is greater than the value in B3, I would like C3 to shade the color green. However, if the value in A3 is less than the value in B3, I would like to shade C3 the color of red.

Thank you in advance for any help.

3 responses

Mazzaropi Posts 1985 Registration date Monday August 16, 2010 Status Contributor Last seen May 24, 2023 147
Jan 5, 2018 at 12:18 PM
DParson55, Good afternoon.

Try to use:
Select C3

1st RULE
Conditional Format --> Using formula --> =A3>B3
--> Format: Fill color as GREEN
OK

2nd RULE
Conditional Format --> Using formula --> =A3<B3
--> Format: Fill color as RED
OK

Please, tell us if it worked as you desired.
I hope it helps.
DParson55 Posts 5 Registration date Friday January 5, 2018 Status Member Last seen February 14, 2018
Jan 5, 2018 at 12:29 PM
That worked indeed. Thank you. One last piece that I neglected to mention, what would the formula be to highlight C3 green in the event that A3 and B3 were equal?
Mazzaropi Posts 1985 Registration date Monday August 16, 2010 Status Contributor Last seen May 24, 2023 147
Jan 5, 2018 at 12:35 PM
DParson55,

Simply change the first rule.

1st RULE
Conditional Format --> Using formula --> =A3>=B3
--> Format: Fill color as GREEN
OK

I hope it helps
--
Belo Horizonte, Brasil.
Marcílio Lobão
DParson55 Posts 5 Registration date Friday January 5, 2018 Status Member Last seen February 14, 2018
Jan 5, 2018 at 12:47 PM
What if I needed to make the "equal to" function yet a third color, say Yellow?
DParson55 Posts 5 Registration date Friday January 5, 2018 Status Member Last seen February 14, 2018
Jan 5, 2018 at 12:52 PM
Got it. Thank you again for your help!
Mazzaropi Posts 1985 Registration date Monday August 16, 2010 Status Contributor Last seen May 24, 2023 147
Jan 5, 2018 at 01:49 PM
Glad to have helped you.

Have a nice weekend.
--
Belo Horizonte, Brasil.
Marcílio Lobão