Arlen,
It's not the use of a formula that is the problem, but
there are a couple problems with your formula.
1) I think what you meant to say with Row(ActiveCell) is
actually Activecell.Row. I suspect this is the source of
your latest error message.
2) In order to get the month in cell A1 you should write
Month(Range("A1")). Month(a1) will result in 12
regardless of what is in cell A1.
Make those changes and see if it helps.
Erin
-----Original Message-----
While writng a macro, it occurred to me that I don't know
the syntax for
inserting a formula rather than a hard value for .Offset
(ROWS,COLUMNS)
Here is the gist of my line:
Instead of Offset(4, -1), say...
I would like to Offset ROWS by looking at the current
month (in A1),
timesing that by 25, then subtracting (29 minus the row
that the active data
entry cell is in.)
I've tried a bunch of stuff, but it takes nothing...
..Offset(MONTH(A1)*25-(29-Row(ActiveCell)),-1).Address
& ","
is its latest incarnation.
Does anybody know how this can be done?
Thanks for your continued support.
Arlen
.
|