hello I have found this code
how do I change the code to only change the selected cells to turn white
Cells.Interior.ColorIndex = 0
Cells(A12:AE39).Interior.ColorIndex = 0
I only want it to work on A12:AE39
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
Application.ScreenUpdating = False
'Clear all cell colours
Cells.Interior.ColorIndex = 0
With Target
'Row and column highlightingfor the active cell
.EntireRow.Interior.ColorIndex = 19
.EntireColumn.Interior.ColorIndex = 19
End With
Application.ScreenUpdating = True
End Sub
Thank Jay
how do I change the code to only change the selected cells to turn white
Cells.Interior.ColorIndex = 0
Cells(A12:AE39).Interior.ColorIndex = 0
I only want it to work on A12:AE39
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
Application.ScreenUpdating = False
'Clear all cell colours
Cells.Interior.ColorIndex = 0
With Target
'Row and column highlightingfor the active cell
.EntireRow.Interior.ColorIndex = 19
.EntireColumn.Interior.ColorIndex = 19
End With
Application.ScreenUpdating = True
End Sub
Thank Jay