Conditional formatting/Formatting in VBA

[Closed]
Report
-
Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
-
I need some help with Conditional Formatting/Formatting using VBA.

I need a VBA code that will look at one cell and set the conditional formatting on another cell based on the two options in the first cell.

For Example:
If Cell A1 has a drop down list and can be either "A" or "B" and the acceptable value range of B1 depends on the letter in A1. If Cell A1 = "A" then cell B1 would have the conditional formatting to be blue for values between 1.5-3 and red for values less than 1.5 and above 3. If Cell A1="B" then cell B1 would have the conditional formatting to be blue for values from 1.3 to 2.0 and red for values less than 1.3 and greater than 2.0.

Any help is really appreciated! Thanks!



1 reply

Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
768
Look at the solution by aquarelle at
https://ccm.net/forum/affich-21716-conditional-formatting-more-than-3-in-excel

You would need to do some thing similiar