SOLVED

Add Cell Fill Colour Based on Hex or RGB

Copper Contributor
Is it possible to fill a cell with a colour based on either the hex code or the RGB values of that colour (they would be in neighbouring cells in the same row) without using VBA?
10 Replies

@Beth ten Have 

For the desktop version, if manually,

image.png

Not sure about Excel for mobile

Thanks, but I need the colour for 160 rows of data, so I was hoping that there was a less manual method!

@Beth ten Have 

HEX code is different for each row, for each cell of each row, or the same for all rows or what?

Hi@Beth ten Have , I had a similar task and was wondering if you found a way to fill adjacent cell with the colour matching the hex code entered in the same row?  

@NehaS50 

 

Without VBA it's not doable.

The nearest solution would be the feature "conditional formatting".

 

 

JC

 

 

best response confirmed by Peter Bartholomew (Silver Contributor)
Solution

@Beth ten Have I just figured out a solution here for those still scratching their heads.

 

Make a table with:

  • Column A: Insert your hex codes and name the column "HEX"
  • Column B: Name this column "LINK" and use formula:
  • Column C: Use formula {=image(@[LINK])}

voila

 

This is amazing!!!! @CVWISMO 

Thank you so much!

@CVWISMO That was a great workaround! Thank you!

@CVWISMO 

Fascinating!  I hadn't come across the website and the sizing fields of IMAGE would also appear to open up interesting possibilities.  On 365 the process does not require CSE array formulae and with Lambda functions, the approach can be further packaged

Worksheet formula
= COLORλ(HEX)

image.png

Got a bit carried away!

image.png

1 best response

Accepted Solutions
best response confirmed by Peter Bartholomew (Silver Contributor)
Solution

@Beth ten Have I just figured out a solution here for those still scratching their heads.

 

Make a table with:

  • Column A: Insert your hex codes and name the column "HEX"
  • Column B: Name this column "LINK" and use formula:
  • Column C: Use formula {=image(@[LINK])}

voila

 

View solution in original post