none
Backward conversion from RGB to Excel colorindex i.e. 56 colors

    Question

  • Hi,

    I want to convert RGB color value to Excel colorindex which is 56 color based. First I thought that RGB provides backward conversion. Can you help me how I can get backward compatibility from RGB to 56 colors.

    Regards
    Ahmad
    Wednesday, December 17, 2008 6:22 PM

Answers

  •     I found a way to do it.

        Cells( 1, 1).Interior.Color = RGB(255, 101, 50)
        Cells( 1, 1).Value = Cells( 1, 1).Interior.ColorIndex

        Cells( 1, 1).Value will display the ColorIndex between 0 - 56

    • Marked as answer by Tim Li Friday, December 26, 2008 9:05 AM
    Thursday, December 18, 2008 9:46 AM