I'm trying to assign a formula to a cell in Excel in my macro code. I'm having problems with the quotes. here's the formula I'm trying to paste into excel from the VBA code.
FormulaString = "=if(Indirect(Address(" & row1 & ",3,4)=Indirect(Address(" & row2 & ",2,4,TRUE,"Sheet1"
,0,1)"
The problem is that it doesn't like the quotes within the quotes for the formula and gives me an Expected End of Statement Error. Is there anyway to get around this. Thanks for all the help.
FormulaString = "=if(Indirect(Address(" & row1 & ",3,4)=Indirect(Address(" & row2 & ",2,4,TRUE,"Sheet1"
The problem is that it doesn't like the quotes within the quotes for the formula and gives me an Expected End of Statement Error. Is there anyway to get around this. Thanks for all the help.