1.) The red A is the column that contains the student IDs to be looked up.
2.) Lookup in the entire column A:AD instead of just A2:AD2
Sub ProgStartDtFill()
'
' Maria Lindquist
' 02/15/2016
' This macro will match up the Student IDs and populate the Program Start Date as shown on StudentInfo Sheet
'
Range("D2").Select
Dim i As Long
For i = 2 To Sheets("CrseData").Cells(Rows.Count, "A").End(xlUp).Row
Sheets("CrseData").Cells(i, "D").Value = Application.Evaluate("=VLOOKUP(" & Sheets("CrseData").Cells(i, "A").Value & ",StudentInfo!A:AD,4,0)")
Next i
End Sub
Bookmarks