I have a macro that inserts a number of lines. I know the macro works but I want to improve it by getting it to insert a simple vlookup formula in to the active cell. The cell I want the vlookup in is in column D and the value I want it to look up is in column A. The code I have is
ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-3],Individuals!$A$4:$B$159,2,FALSE)"
but it won't work and gives me a run time error. I suspect I have made a simpel error somewhere but can't see it. Can anyone help me out?
Thanks
ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-3],Individuals!$A$4:$B$159,2,FALSE)"
but it won't work and gives me a run time error. I suspect I have made a simpel error somewhere but can't see it. Can anyone help me out?
Thanks