paste formula based on other column
Posted by Kevin on June 22, 2001 8:23 AM
Hi, I'm trying to write a pretty simple procedure that pastes the "Day" formula into column S based on a date in column E. I'm obviously mishandling the range somehow, but I can't seem to fix it. Here's my code:
Sub setDay()
Dim myDay As Range
For Each myDay In Range("E6:E65536")
If myDay <> "" Then
ActiveCell.Offset(0, 14).Activate
ActiveCell.FormulaR1C1 = "=TEXT(R1C1,dddd)"
End If
Next myDay
End Sub
The maddening thing is I have a very similar procedure that works fine in pasting the formula, though it only offsets by 1 column.
Please help.