Last question for today...I hope.
I want to find the last row with data and call that value from the loop in my vlookup formula (bold red), as opposed to current hard coded values. These amount of rows will be different each time I run.
Here is my code:
Sheets("VSC to FGA").Select
Range("D2").Select
Range("D2:D457" & LR).Formula = "=IF(ISERROR(VLOOKUP($C2,'Matricola Map'!B:G,4,FALSE)),""Not Found"",(VLOOKUP($C2,'Matricola Map'!B:G,4,FALSE)))"
Range("E2:E457" & LR).Formula = "=IF(ISERROR(VLOOKUP($D2,'Matricola Map'!E:F,2,FALSE)),""Not Found"",(VLOOKUP($D2,'Matricola Map'!E:F,2,FALSE)))"
Range("D2:E457").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Range("A1").Select
I want to find the last row with data and call that value from the loop in my vlookup formula (bold red), as opposed to current hard coded values. These amount of rows will be different each time I run.
Here is my code:
Sheets("VSC to FGA").Select
Range("D2").Select
Range("D2:D457" & LR).Formula = "=IF(ISERROR(VLOOKUP($C2,'Matricola Map'!B:G,4,FALSE)),""Not Found"",(VLOOKUP($C2,'Matricola Map'!B:G,4,FALSE)))"
Range("E2:E457" & LR).Formula = "=IF(ISERROR(VLOOKUP($D2,'Matricola Map'!E:F,2,FALSE)),""Not Found"",(VLOOKUP($D2,'Matricola Map'!E:F,2,FALSE)))"
Range("D2:E457").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Range("A1").Select