M
mzehr
Hi,
Bob Phillips had a wonderful VBA routine which I have
adopted and modified, and it works fine. However, I want
to limit the range of the routine to only work if the
change is made in the following ranges (D8
27; D29
44;
D46
68) rather than to occur anywhere in column D (which
is column = 4 in the routine).
Any ideas?
I am using Excel 2000
Private Sub Worksheet_SelectionChange(ByVal Target As
Range)
On Error Resume Next
With Target
If .Column = 4 Then
If .Value = "a" Then
.Value = "q"
.Font.Name = "Monotype Sorts"
.Offset(0, 1).Value = ""
Else
.Value = "a"
.Font.Name = "Marlett"
.Offset(0, 1).Value = Format(Date, "dd mmm
yyyy")
End If
.Offset(0, 1).Activate
End If
End With
End Sub
Thanks,
Mike
Bob Phillips had a wonderful VBA routine which I have
adopted and modified, and it works fine. However, I want
to limit the range of the routine to only work if the
change is made in the following ranges (D8


D46

is column = 4 in the routine).
Any ideas?
I am using Excel 2000
Private Sub Worksheet_SelectionChange(ByVal Target As
Range)
On Error Resume Next
With Target
If .Column = 4 Then
If .Value = "a" Then
.Value = "q"
.Font.Name = "Monotype Sorts"
.Offset(0, 1).Value = ""
Else
.Value = "a"
.Font.Name = "Marlett"
.Offset(0, 1).Value = Format(Date, "dd mmm
yyyy")
End If
.Offset(0, 1).Activate
End If
End With
End Sub
Thanks,
Mike