I have a bunch of range names (mostly single cells) in a worksheet. When I change the cell named "Grade" I want its value to appear in another range called "GrdSrchSttng" (6 x 1 range) as the last value. However to do that I need to know that the particular cell named "Grade" changed. The solution to this question does not work.
I tried this:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim isIn As Boolean
Dim i As Integer
Dim r As Range
Set r = ActiveSheet.Range("GrdSrchSttng")
If Target.Name.Name = "Search!Grade" Then ' <== this si the line I have the issue with
Select Case Target.Value
Case "All"
r.ClearContents
r.Cells(1, 1).Value = "All"
Case ""
r.ClearContents
Target.Value = "All"
r.Cells(1, 1).Value = "All"
Case Else
If r(1, 1).Value = "All" Then
r.ClearContents
End If
i = 1
Do While r(i, 1).Value <> ""
If r(i, 1).Value = Target.Value Then
isIn = True
End If
i = i + 1
Loop
If Not isIn Then
r(i, 1).Value = Target.Value
End If
End Select
End If
End Sub