Forum Discussion

gtfoster's avatar
gtfoster
Copper Contributor
Aug 22, 2022

Highlight a cell only when selected

Running Excel 365. Is there a way to highlight only the cell that is selected? When editing, have each cell highlight only when that cell is selected. All the cells seem to run together and makes it difficult to find the cell I'm working on. As I advance to the next cell, I want it to highlight only when it is selected. Possible??

1 Reply

  • Harun24HR's avatar
    Harun24HR
    Bronze Contributor

    gtfoster Yes, possible. You need VBA macro to do that. Use below macro.

    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
        Application.ScreenUpdating = False
        Cells.Interior.ColorIndex = 0
        Target.Interior.ColorIndex = 8
        Application.ScreenUpdating = True
    End Sub

     Microsoft Documentation 

Resources