Hi Guys,
Im working on making a dashboard which requires that as soon as I enter a value in my dashboard sheet in column E, it should find that value in another sheet called data and take up the value from the column adjacent to it and paste it in my dashboard sheet after one column. Im working on a project and need this really badly. This is the code Im using now. Please help
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
On Error GoTo MyErrorHandler:
result = Application.WorksheetFunction.Vlookup(Cells(ActiveCell.Row, "E"), Sheets("Data").Range("B:C"), 2, False)
ActiveCell.Offset(0, 2).Value = result
MyErrorHandler:
If Err.Number = 1004 Then
ActiveCell.Offset(0, 2).Value = ""
End If
End Sub
Im working on making a dashboard which requires that as soon as I enter a value in my dashboard sheet in column E, it should find that value in another sheet called data and take up the value from the column adjacent to it and paste it in my dashboard sheet after one column. Im working on a project and need this really badly. This is the code Im using now. Please help
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
On Error GoTo MyErrorHandler:
result = Application.WorksheetFunction.Vlookup(Cells(ActiveCell.Row, "E"), Sheets("Data").Range("B:C"), 2, False)
ActiveCell.Offset(0, 2).Value = result
MyErrorHandler:
If Err.Number = 1004 Then
ActiveCell.Offset(0, 2).Value = ""
End If
End Sub