change the display of the active cell

Copper Contributor

Sin título.jpg

Is there any way to make the box that shows the active cell more visible? For example, the line should be thicker or of another color
thank you

4 Replies

Hi @ardiaz0124 ,

 

It is possible to this by using VBA. In VBA editor, you first have to (1) select the sheet that you want to apply this highlights, (2) change the object to "Worksheet" and (3) change the procedure to "SelectionChange":

rzaneti_0-1675351803751.png

 

After, you can paste the following code (extracted from Microsoft Documentation, at this link) inside the Private Sub Worksheet_SelectionChange:

       ' Clear the color of all the cells
    Cells.Interior.ColorIndex = 0
    If IsEmpty(Target) Or Target.Cells.Count > 1 Then Exit Sub
    Application.ScreenUpdating = False
    With ActiveCell
        ' Highlight the row and column that contain the active cell, within the current region
        Range(Cells(.Row, .CurrentRegion.Column), Cells(.Row, .CurrentRegion.Columns.Count + .CurrentRegion.Column - 1)).Interior.ColorIndex = 4
        Range(Cells(.CurrentRegion.Row, .Column), Cells(.CurrentRegion.Rows.Count + .CurrentRegion.Row - 1, .Column)).Interior.ColorIndex = 4
    End With
    Application.ScreenUpdating = True

 

The result will be the following, and the highlighted row/column will change according to the cell that you click:

rzaneti_1-1675351975860.png

 

You can change the color of the highlight by changing the numbers of "Interior.ColorIndex" in lines 7 and 8. 

 

Note that:

1. This highlight won't work if you have more than one cell in the same selection;

2. You will have to apply this same piece of code to all of the Sheets that you need.

 

Let me know if you need any additional help with this problem. 

@ardiaz0124 

Try the free add-in Follow Cell Pointer, available from Jan Karel Pieterse's download page 

so excel does not have that option in its menus without having programming knowledge, thank you very much for your solution
so excel does not have that option in its menus, thank you very much for your solution