I'm trying to write a code to place a formula into specific cells based on user input. If I write "= 1" or some other specific value then it pastes into the proper cells no problem but when I ask it to place a formula into those cells I keep getting compile errors. The formula works if I manually place it into the cells so it must be a VBA syntax issue.
For x = 2 To y
cells(x, 1) = "=MATCH(INDIRECT("b"&(ROW()))&"*",MSLD!A:A,0)"
I've double checked that I've closed all parenthesis and quotes a million times. If it helps, when I close the error message it highlights the "b" which I assume is telling me that's where my error lies.
Thanks in advance!
Brian
Bookmarks