I'm using VBA to paste a VLOOKUP formula in one worksheet based on a table array found in another workbook's worksheet. I created a macro in Excel to try to get the correct syntax:
=VLOOKUP(G2,[Book2]Sheet1!$B$2:$AH$100000,33,TRUE)
but when I try to paste it from Access VBA:
xlWs.Range("AC2").FormulaR1C1 = "=VLOOKUP(G2,[Book2]Sheet1!$B$2:$AH$100000,33,TRUE)"
I get an error 1004 message, "Application-defined or object-defined error."
Can anyone tell me what the correct syntax for VBA should be?
=VLOOKUP(G2,[Book2]Sheet1!$B$2:$AH$100000,33,TRUE)
but when I try to paste it from Access VBA:
xlWs.Range("AC2").FormulaR1C1 = "=VLOOKUP(G2,[Book2]Sheet1!$B$2:$AH$100000,33,TRUE)"
I get an error 1004 message, "Application-defined or object-defined error."
Can anyone tell me what the correct syntax for VBA should be?