I am attempting to use a Vlookup (application) is Visual basic. the intent is to populate a column by referencing a dynamic array on an other worksheet. Attached is the code that I am using. Any help would be beneficial.
'Import Past Actual Start Dates________________________________________________________
Worksheets("Past Update").Activate
Set R1 = ActiveSheet.Range("a2").CurrentRegion
Worksheets("Actual Changes (C)").Activate
ActiveSheet.Range("e4").Activate
finished = False
Do
M = M + 1
N = M + 3
ActiveCell.Value = Application.WorksheetFunction.VLookup(Cells(N, 1).Value, Worksheets("Past Update").R1.Cells, 5, False)
ActiveCell.Offset(1, 0).Activate
If M = ii Then finished = True
Loop Until finished
ActiveSheet.Range("d4").EntireColumn.AutoFit
Thanks
'Import Past Actual Start Dates________________________________________________________
Worksheets("Past Update").Activate
Set R1 = ActiveSheet.Range("a2").CurrentRegion
Worksheets("Actual Changes (C)").Activate
ActiveSheet.Range("e4").Activate
finished = False
Do
M = M + 1
N = M + 3
ActiveCell.Value = Application.WorksheetFunction.VLookup(Cells(N, 1).Value, Worksheets("Past Update").R1.Cells, 5, False)
ActiveCell.Offset(1, 0).Activate
If M = ii Then finished = True
Loop Until finished
ActiveSheet.Range("d4").EntireColumn.AutoFit
Thanks