evaluate a year expression
You are probably looking for the formula to be
ActiveCell.FormulaR1C1 = "=YEAR(RC[-5])=" & i
but it really depends on what you are trying to do, your variable i was just
plugged in as a letter since it was in "".
--
-John
Please rate when your question is answered to help us and others know what
is helpful.
"Clint Eastwood" wrote:
What is the proper expression to eval the following formula?? I keep getting
#name? in my spreadsheet.
Thanks
For i = 2007 To 2009
Selection.AutoFilter
Range("F3").Select
ActiveCell.FormulaR1C1 = "=YEAR(RC[-5])=i"
.
.
.
.
next i
|