A
Ayo
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim RF_Table As Range, RF As Range
Set RF_Table = Worksheets("Sheet3").Range("H2:J5").Cells
Set RF = Range("P42000")
Application.ScreenUpdating = False
With Target
If .Count > 1 Then Exit Sub
If Not Intersect(RF, .Cells) Is Nothing Then
If Not IsEmpty(Target) Then
Application.EnableEvents = False
With .Offset(0, 1)
.Value =
Application.WorksheetFunction.VLookup(Target, RF_Table, 2, False)
End With
Application.EnableEvents = True
End If
End If
End If
End With
End Sub
Dim RF_Table As Range, RF As Range
Set RF_Table = Worksheets("Sheet3").Range("H2:J5").Cells
Set RF = Range("P42000")
Application.ScreenUpdating = False
With Target
If .Count > 1 Then Exit Sub
If Not Intersect(RF, .Cells) Is Nothing Then
If Not IsEmpty(Target) Then
Application.EnableEvents = False
With .Offset(0, 1)
.Value =
Application.WorksheetFunction.VLookup(Target, RF_Table, 2, False)
End With
Application.EnableEvents = True
End If
End If
End If
End With
End Sub