Set background colour of cell to RGB value of data in cell

Internet man picture Internet man · Sep 15, 2009 · Viewed 259.5k times · Source

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?

Answer

Galwegian picture Galwegian · Sep 15, 2009

You can use VBA - something like

Range("A1:A6").Interior.Color = RGB(127,187,199)

Just pass in the cell value.