Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Dim myLookupValue As Range
- Dim strResult As String
- Dim lngLastRow As Long
- Dim lngLoop As Long
- Dim ProjectManName As String
- Set myLookupValue = Worksheets("Employees").Range("A1", Worksheets("Employees").Range("B1").End(xlDown))
- With Worksheets("Project Summary")
- lngLastRow = .Cells(.Rows.Count, 1).End(xlUp).Row
- For lngLoop = 2 To lngLastRow
- On Error Resume Next
- ProjectManName = .Cells(lngLoop, 1).Value
- strResult = Application.WorksheetFunction.VLookup(ProjectManName, myLookupValue, 2, False)
- Range("K" & lngLoop).Value = strResult
- ActiveCell.Offset(1, 0).Select
- Next
- End With
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement