My excel file consists of 2 worksheets, "result" and "merchant2"
Trying to insert this formula in cell C1 of sheet "result" and then copy down:
The formula works normally if I insert it manually, but if I want to do it through VBA (including the copy down in the code) I get error 1004 application defined or object defined error
I tried double quoting the quotes but same thing
I can see the line where formula is highlighted in yellow
I know there are other posts about this but formulas vary and didn't want to hijack them with my question
Thank you for your help in advance.
Trying to insert this formula in cell C1 of sheet "result" and then copy down:
Code:
=IFERROR(VLOOKUP(A1;merchant2.csv!$A$1:$B$1000;2;FALSE);"")
The formula works normally if I insert it manually, but if I want to do it through VBA (including the copy down in the code) I get error 1004 application defined or object defined error
I tried double quoting the quotes but same thing
I can see the line where formula is highlighted in yellow
Code:
Sub FillDown()
Sheets("result").Range("C1:C" & LastRow).Formula = "=IFERROR(VLOOKUP(A1;merchant2!$A$1:$B$1000;2;FALSE);"""")"
End Sub
I know there are other posts about this but formulas vary and didn't want to hijack them with my question
Thank you for your help in advance.