I am using this code to mark cells with an x to track certain things.
When a cell is clicked on, it puts an x in the cell immediatley to the right. Does anyone know how to alter this code to put an "X" in the cell directly below a cell that is selected?
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Target.Column <> 6 And Target.Column <> 8 And Target.Column <> 10 And Target.Column <> 12 Then Exit Sub
On Error GoTo errhandler
Application.EnableEvents = False
With Target.Offset(0, 1)
If .Value = "" Then
.Value = "X"
Else
.Value = ""
End If
End With
errhandler:
Application.EnableEvents = True
End Sub
Thanks for your help. Tawnee
Bookmarks