Try this, there are neater ways though :o)
Public Sub FirstOfMonth()
FOM = Format(Date, "dd")
If FOM = 1 Then
Range("D1").Select ' Enter starting point in sheet
Do
OriginalTime = ActiveCell.Value
ActiveCell.FormulaR1C1 = (OriginalTime + "4")
ActiveCell.Offset(RowOffset:=1).Activate
Loop Until ActiveCell.Row = "200" 'Enter final point in sheet
End If
End Sub
Regards,
Gary Hewitt-Long
I forgot to add, if you want this to be truly automatic, then you need to have excel run the code when it starts.
If the day does = 1 then you will need to add in extra code to open the workbook before running the Do Loop and then save before closing.
Or
If it's a workbook you open everyday, then add it between:
Sub Workbook_Open()
End Sub
Also if the 1st falls on a weekend and the machine isn't on, then you will also need to add extra code to check over three days, to see whether it has been executed yet, and if not then run the code.
HTH
Regards,
Gary Hewitt-Long
THANK YOU - THANK YOU - THANK YOU!!!! It worked perfectly!!
What should the code look like with the adjustments? I won't be opening it every day and I'm not sure what the code would be to have it check over three days incase the 1st lands on a weekend. I just copied and pasted the last set of codes you gave me and then made a few minor adjustments. I really appreciate all your help - I've been going nuts trying to figure this out.