I am in th process of switching over from a worksheet to vba code.
I am stuck on one are with table lookups.
Code in the workbook is;
=IFERROR(IF(XXX="XXX",VLOOKUP(XXXX,'Directory[EXCEL FILE]SHEET'!$A:$E,5,0))
In my VBA Code, I have;
If Selection.Value = "XXXX" Then
ActiveCell.Offset(0, 3).Select
ActiveCell.FormulaR1C1 "=IFERROR(VLOOKUP(R[0]C[-1], '[File]Sheet'!$A:$E,5,0"""")"
End If
I get a compile error of Invalid use of property.
Any suggestions.
Thanks
I am stuck on one are with table lookups.
Code in the workbook is;
=IFERROR(IF(XXX="XXX",VLOOKUP(XXXX,'Directory[EXCEL FILE]SHEET'!$A:$E,5,0))
In my VBA Code, I have;
If Selection.Value = "XXXX" Then
ActiveCell.Offset(0, 3).Select
ActiveCell.FormulaR1C1 "=IFERROR(VLOOKUP(R[0]C[-1], '[File]Sheet'!$A:$E,5,0"""")"
End If
I get a compile error of Invalid use of property.
Any suggestions.
Thanks