"RVS" try the below
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("A2:A100")) Is Nothing Then
If Target.Count = 1 Then
Target.Font.Name = "Marlett"
Target.Value = IIf(Target.Value = "r", "e", "r")
'Target.Value = IIf(Target.Value = "a", "e", "a") 'For tick mark
End If
End If
End Sub
If this post helps click Yes
---------------
Jacob Skaria
"RVS" wrote:
> Hello All!
>
> I am trying to write code that will add a check mark to any cell in Column A
> upon selection. Here is what I've written, but I cannot get it to work.
>
> Private Sub Worksheet_SelectionChange(ByVal Target As Range)
> If Target.Cells.Count > 1 Then Exit Sub
>
> If Not Intersect(Target, Range("A2:A100")) Is Nothing Then
>
> Target.Font.Name = "Marlett"
>
> If Target = vbNullString Then
>
> Target = "a"
>
> Else
>
> Target = vbNullString
>
> End If
>
> End If
>
> End Sub
>
> Any thoughts on why this is not working?
> Thanks in advance!
|