I'm trying to generate an address for an alternate worksheet and I'm
running into a syntax problem that I don't understand.
I have the name of the worksheet in one column and I'm trying to write
a macro that will take that worksheet name, add a fixed reference to it.
My code is:
Temp = ActiveCell.Offset(0, -1).Value
ActiveCell.FormulaR1C1 = "='" & Temp & "'" & "!F2"
Value in Temp = "Smith, John J." (which matches the name of one of the
worksheets"
What I'm expecting back is : ='Adams, Michael'!F2
What I get back is : ='Adams, Michael'!'F2'
What am I doing wrong?