I am trying to write a code such that each time the cell in a specific row is click, it would change to a color and the counter which track the total number of cell in the row has been selected will count.
However, I can only achieve the change color but the counter would not continue to increase after it change to one.
Can someone advice me on what is wrong with my coding?
Private Sub Worksheet_DoubleClick(ByVal Target As Range, Cancel as Boolean)
If Not Intersect (Target, Me.Range("C17:I17)) Is Nothing Then
Target.Interior.ColorIndex = 4
Cancel = True
If IsNumeric(Me.Range("C17:I17").Value) Then
Range("G4").Value = Range("G4").Value + 1
Range("G4").Value = 1