R
Romac Rob
I want to change the value of certain cells based on the input of another
cell. Looking at other posts, I came up with this code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Count > 1 Then
Exit Sub
End If
If IsEmpty(Target) Then
Exit Sub
End If
If Target.Address = "$I$12" Then
Select Case Target.Value
Case "VHS"
Range("D27").Select
ActiveCell.FormulaR1C1 = "N/A"
Case "VSS"
Range("F28").Select
ActiveCell.FormulaR1C1 = "N/A"
End Select
End If
The problem is: This code runs when the cell is selected. I need it to run
after the cell is edited, on exit of the cell (another cell selected...).
Please help!
cell. Looking at other posts, I came up with this code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Count > 1 Then
Exit Sub
End If
If IsEmpty(Target) Then
Exit Sub
End If
If Target.Address = "$I$12" Then
Select Case Target.Value
Case "VHS"
Range("D27").Select
ActiveCell.FormulaR1C1 = "N/A"
Case "VSS"
Range("F28").Select
ActiveCell.FormulaR1C1 = "N/A"
End Select
End If
The problem is: This code runs when the cell is selected. I need it to run
after the cell is edited, on exit of the cell (another cell selected...).
Please help!