L
Little pete
i have the following code added to the s/s tab which does what i want but is
there a way of adding this to cell like a formula thing like vlookup??
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Target.Column = 2 Then
If Target.Value = "" Then Exit Sub
Application.EnableEvents = False
Target.Value = Worksheets("Station").Range("A1") _
.Offset(Application.WorksheetFunction _
.Match(Target.Value, Worksheets("Station").Range("StationList"), 0), 0)
Application.EnableEvents = True
End If
End Sub
thanks pete
there a way of adding this to cell like a formula thing like vlookup??
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Target.Column = 2 Then
If Target.Value = "" Then Exit Sub
Application.EnableEvents = False
Target.Value = Worksheets("Station").Range("A1") _
.Offset(Application.WorksheetFunction _
.Match(Target.Value, Worksheets("Station").Range("StationList"), 0), 0)
Application.EnableEvents = True
End If
End Sub
thanks pete