Conditional formatting with indirect colors formating

lsmoes

New Member
Joined
Jul 18, 2023
Messages
2
Office Version
  1. 2016
Platform
  1. Windows
Hi
I need help here.
I want to conditional format a range, depending on the value of the cell -> all clear here... I can do this easily

-> what I want though is instead of formating the cells with a fixed format (color specifically) I want to use colors that can be variable...

-->>> eg cell B1 should be formatted (following a conditional rule - eg B1 > C1) filled with the color that is in D1


With that the users can dynamically change the color schemes in D1:.... and it updates accordingly.#
PS: I do have VBA function that reads the background color of the cell in D1... so that the number could be used

How can then I use an indirect link to a color for formating

Thanks!
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Excel formulas (and formulas that are used in Conditional Formatting) can only run off of cell values, not their formatting.
I believe to do what you want would require the use of VBA.

If you are looking for some sort of automated VBA code, an Event Procedure is probably what you would use here. The main ones are:
Worksheet_Change - runs whenever a cell is manually updated
Worksheet_SelectionChange - runs whenever a cell is selected
Worksheet_Calculate - runs whenever any cell on the sheet is re-calculated (i.e. due to a change from a formula calculation)

If you need help setting this up, please provide specific details on how you would like this to work, i.e. what cells are being updated, how they are being updated, what cells they affect, when the code should be triggered to run.
 
Upvote 0

Forum statistics

Threads
1,223,722
Messages
6,174,103
Members
452,544
Latest member
aush

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