Analyze_This
Board Regular
- Joined
- Oct 29, 2008
- Messages
- 122
I'm writing some code where I take the value below the active cell and concatinate the Month-Year. I recorded this method:
And then tried to add in the variables (which I have confirmed do work fine). I've tried several methods with this one getting me the closes:
Do I just have the Syntax wrong, or am I completely wrong on how this works?
Code:
ActiveCell.FormulaR1C1 = _
"=R[-4]C&"" ""&TEXT(R[-8]C[4]&""-""&R[-9]C[4],""mmm-yyyy"")"
And then tried to add in the variables (which I have confirmed do work fine). I've tried several methods with this one getting me the closes:
Code:
Do
ActiveCell.FormulaR1C1 = _
"=R[1]C&"" ""&TEXT( & Month & "" - "" & year &,""mmm-yyyy"")"
ActiveCell.Offset(0, 1).Select
Loop Until ActiveCell.Column = RightStop
Do I just have the Syntax wrong, or am I completely wrong on how this works?