Conditional Formatting to change the Fill color of a cell based on the hex value of a different cell.

Mr. Snrub

Board Regular
Joined
May 22, 2005
Messages
150
Office Version
  1. 365
Platform
  1. Windows
I have a block of cells A1:D4. I want to set the fill color of that block based on the value of cell F1, which should have the form #XXXXXX, where “X” is a hexadecimal digit. And as I change the values of cell F1 the fill colors change as well. Is this possible? I tried conditional formatting rules but it looks like I can only set the fill color to a single static value.
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Conditional formating should be able to do this, or something like it.
The fact that F1 contains hexadecimal digits is, I think, irrelevant, Excel will just use the underlying value, regardless of how it's formatted.
But I think you might have to set up a new CF rule for each different colour that you want, and that could be fiddly, IF you want lots of colours.
 
Last edited:
Upvote 0
Errrr... yeah that’s not ideal.

How about this, then: I set the fill color of F1 through the Font menu, then I click a button that executes a VBA macro that will set the Fill color of cells A1:D4. That might be a better solution anyway.
 
Upvote 0

Forum statistics

Threads
1,223,703
Messages
6,173,941
Members
452,539
Latest member
delvey

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