Reputation: 469
I need to refer to a sheet whose name is stored in variable J
ActiveCell.FormulaR1C1 = "=VLOOKUP(R[-1]C,' " & J & " '!R32C1:R" & row_count & "C32,2,0)"
I am using the following formula but it is not working
Upvotes: 0
Views: 61
Reputation: 34035
You need to remove the spaces after the apostrophes:
ActiveCell.FormulaR1C1 = "=VLOOKUP(R[-1]C,'" & J & "'!R32C1:R" & row_count & "C32,2,0)"
Upvotes: 2