Private Sub Worksheet_SelectionChange(ByVal Target As Range)
'
Dim p As Integer
Dim r As Range
p = Cells(Rows.count, "B").End(xlUp).Row
Set r = Range("A4:A" & p)
If Not Intersect(Target, r) Is Nothing Then
If Target.cells(1,1).value = "a" Then
Target.cells(1,1).value = ""
Else
Target.cells(1,1).value = "a"
End If
End If
'
End Sub
|