hellp RRS feed

  • Question

  • how to change  cell color based an other cell color not based value in excel
    Wednesday, October 4, 2017 9:53 AM

All replies

  • Hello,

    The conditional formatting does not support that. You may handle Worksheet_SelectionChange event to check the color of one cell and then set color of another cell.


    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    Select Case Range("a1").Interior.ColorIndex
    Case 6
    Range("B1").Interior.ColorIndex = 3
    Case 3
    Range("B1").Interior.ColorIndex = 6
    End Select
    End Sub




    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Proposed as answer by Chenchen Li Tuesday, October 10, 2017 7:50 AM
    Thursday, October 5, 2017 7:33 AM