Costa_Mukhar
New Member
- Joined
- Jun 6, 2015
- Messages
- 20
Hello experts,
I am using the above code for a vlookup and it is working fine, but when applying the formula on the range, it is applying it on one more cell. Range("A:A") is till row 15, but it applies the formula till row 16 in Range("C:C").
Is there something wrong with the code? appreciate you help....thanks
Code:
Sub Bond_Accruals()
With Worksheets("cost report").Range("C5:C" & Range("A" & Rows.Count).End(xlUp).Row)
.FormulaR1C1 = "=vlookup(RC[-1],'BA'!C4:C8,5,False)"
.FormulaR1C1 = .Value
End With
End Sub
I am using the above code for a vlookup and it is working fine, but when applying the formula on the range, it is applying it on one more cell. Range("A:A") is till row 15, but it applies the formula till row 16 in Range("C:C").
Is there something wrong with the code? appreciate you help....thanks
Last edited: