I have a column containing RGB values, e.g.:
127,187,199 67,22,94
In Excel, is there any way I can use this to set the background colour of the cell?
On the Home tab, in the Style group, click the arrow next to Conditional Formatting, and then click Highlight Cells Rules. Select the command you want, such as Between, Equal To Text that Contains, or A Date Occurring. Enter the values you want to use, and then select a format.
In the example above, you are changing the cell color based on that cell value only. You can also change the cell color based on other cells value as well. Suppose you want to change the color of cell E3 based on the value in D3. To do that, you have to use the formula in conditional formatting.
You can use VBA - something like
Range("A1:A6").Interior.Color = RGB(127,187,199)
Just pass in the cell value.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With