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

DreyFox

Board Regular
Joined
Nov 25, 2020
Messages
61
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

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
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
 
Upvote 0

Forum statistics

Threads
1,214,547
Messages
6,120,139
Members
448,948
Latest member
spamiki

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