How do I change the background color of another cell based on the value of a ListBox + another cell?

DreyFox

New Member
Joined
Nov 25, 2020
Messages
45
Office Version
  1. 2016
Platform
  1. Windows
Hello!

So I have a ListBox with about 4 items, and a cell which will contain random numbers. When the cell with random numbers is less than 1.10 And the ListBox's value is a specific item, then I would like for another cell to be colored green. If the cell with random numbers is greater than 1.10, And the ListBox's value is a specific item, I would like for another cell to be red.

I'm not sure how to implement this, but any help would be greatly appreciated. Thank you!
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.

6StringJazzer

Well-known Member
Joined
Jan 27, 2010
Messages
842
Office Version
  1. 365
Platform
  1. Windows
You need to link the listbox to a cell, then you can use conditional formatting. After you have linked the listbox to a cell, set up two conditional formatting rules to apply to the cell to color:

Let's say the listbox is linked to A1
The random number is in B2
The value in the listbox to trigger green is GREENVALUE
The value in the listbox to trigger red is REDVALUE

=AND(B2<1.1,A1="GREENVALUE")
format green color

=AND(B2>1.1,A1="REDVALUE")
format red color
 

Watch MrExcel Video

Forum statistics

Threads
1,129,486
Messages
5,636,610
Members
416,929
Latest member
Nitil

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
Top