looping ... date formula ...
You might try replacing the part of your code that enters the formula with
this:
With Cell
.Offset(0, -3).Value = "=Date(Year(" & .Offset(-1, -3).Address _
& "),Month(" & .Offset(-1, -3).Address _
& ") +1, Day(" & .Offset(-1, -3).Address & "))"
End With
Your code enters everything to the right of the "=" as literal text.
Literal VBA code like "cell.Offset(-1, -3))" has no meaning in a worksheet
cell. You have to enter what that code evaluates to.
--
Jim Rech
Excel MVP
|