Forum Discussion

Beth ten Have's avatar
Beth ten Have
Copper Contributor
May 12, 2020
Solved

Add Cell Fill Colour Based on Hex or RGB

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?
  • 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

     

  • CVWISMO's avatar
    CVWISMO
    Copper Contributor

    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

     

    • SacredSteve's avatar
      SacredSteve
      Copper Contributor

      Could you please give an example showing how to do the same exact thing only with the coloring of TEXT within a cell instead of coloring the background of a cell?  CVWISMO 

      • SacredSteve's avatar
        SacredSteve
        Copper Contributor
        Unfortunately, I could not get the original solution to work.
    • cm22lb's avatar
      cm22lb
      Copper Contributor

      CVWISMO 

       

      When i have done this on my work computer it comes up as BLOCKED!. I then also tried it on my personal excel to see if the problem was with the external link being blocked and it then came up saying FIELD! and then i tried again and it said BUSY!.

       

      Each time i tried re entering the formulas and then it swaps to saying #VALUE!

       

      Does anybody know what the issue is or how to correct it/ what I might be doing wrong?

      • Plant's avatar
        Plant
        Copper Contributor

        I had the same issue until I removed the # from my hex codes, at which point it worked just fine.

    • PeterBartholomew1's avatar
      PeterBartholomew1
      Silver Contributor

      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)

    • Beth ten Have's avatar
      Beth ten Have
      Copper Contributor
      Thanks, but I need the colour for 160 rows of data, so I was hoping that there was a less manual method!
      • NehaS50's avatar
        NehaS50
        Copper Contributor

        HiBeth 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?  

Resources