retrieve cell color of conditional formatted cell by colorscale

  • Hello,


    This is my first post in this forum :-)


    Well I have an excel range where conditional formatting of colorscale is applied. Highest value becomes red, lowest becomes green and shades in between.


    Now I need to retrieve the color of these cells at a later point. But the color returned is always white.


    Any thoughts how it can be achieved?


    Thanks..!!

  • Try

    Code
    1. Sub ColorByCondFormat()
    2. Dim i As Long
    3. 'Assumes conditional formatting applied to A1
    4. i = Cells(1, 1).DisplayFormat.Interior.ColorIndex
    5. End Sub

    If I've been helpful, let me know. If I haven't, let me know that too.

  • Hi dangelor,


    I tried your suggestion.

    Getting colors back but all are shades of red and yellow. Where it was white, it is magenta now.


    Any further idea?


    Also argb hex code is getting retrieved.