Currently, I am using worksheet_change to automatically change cell colours when a user makes any changes to a cell's value. However, my else
clause runs when a user enters and leaves a cell without changing the cell's value (User probably double clicked a cell, then clicked on a different cell instead of pressing escape.) . How can I amend my code so that the Else
clause only runs if the user has made changes to the cell's value?
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("A1:Z200")) Is Nothing Or Target.Cells.Count > 1 Then
Exit Sub
Else
Range(Target.Address).Interior.ColorIndex = 43
End If