I have a vlookup code that is coping the vlookup to the last row for a worksheet. I have a second worksheet that I am setting up and this step is exactly the same so I copied and pasted it to my VBA code but the vlookup is stopping at the H2 & I2 cells and not copying the vlookup to the end of the data. I have been hours looking at this...What am I missing?
VBA Code:
Dim LastRow As Long
LastRow = Cells(Rows.Count, 2).End(xlUp).Row
Range("H2").Select
Application.CutCopyMode = False
Application.CutCopyMode = False
Range("h2:h" & LastRow).FormulaR1C1 = _
"=VLOOKUP(RC[-7],'Exhibit Vlookup Table'!R4C3:R65C14,9,FALSE)"
Range("h2:h" & LastRow).Value = Range("h2:h" & LastRow).Value
Range("I2").Select
Application.CutCopyMode = False
Application.CutCopyMode = False
Range("i2:i" & LastRow).FormulaR1C1 = _
"=VLOOKUP(RC[-8],'Exhibit Vlookup Table'!R4C3:R65C14,12,FALSE)"
Range("i2:i" & LastRow).Value = Range("i2:i" & LastRow).Value
Columns("A:J").Select
Columns("A:J").EntireColumn.AutoFit
Range("A1").Select