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
44
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!
 

Some videos you may like

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.

6StringJazzer

Well-known Member
Joined
Jan 27, 2010
Messages
824
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,127,832
Messages
5,627,150
Members
416,223
Latest member
RichardHell

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