-
Solved: Tweeking formula
[VBA]Sub Maturity()
'
' Lookup Maturity
Windows("sunrise.csv").Activate
Application.Run "BLPLinkReset"
Range("AB7").Resize(Range("A2").End(xlDown).Row - 1).FormulaR1C1 = _
"=VLOOKUP(RC[-27],'[Sunrise Perform Input 8.31.2011.xls]Sheet1'!R1:R65536,10,FALSE)"
End Sub[/VBA]
how do i get this formula to fill down all AB cells that are present? Could be AB2 to AB20, could be AB2 to AB100. etc..
-
hi.
try...
[VBA]
Dim LastRow As Long
'row num of last cell with data, column A:
LastRow = Cells(Rows.Count, "A").End(xlUp).Row
Range("AB2:AB" & LastRow).FormulaR1C1 = _
"=VLOOKUP(RC[-27],'[Sunrise Perform Input 8.31.2011.xls]Sheet1'!R1:R65536,10,FALSE)"
[/VBA]
-
ps: not sure if this part is true: Sheet1!R1:R65536
maybe Sheet1!C1:C256 or Sheet1'!R1C1:R65536C256