Help with dates

Closed
dspringwater - Aug 14, 2009 at 01:13 PM
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Aug 14, 2009 at 08:44 PM
Hello,
What is the formula or how do I automaticall change the date from one sheet to another?
Ex. Sheet 1 A5(Date) needs to add one to sheet 2 A5 (Date) and so on and so on.
How do I get this to happen?

1 response

venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 811
Aug 14, 2009 at 08:44 PM
try this modify to suit you

Sub test()
Dim ddate, j As Integer, k As Integer
With Worksheets("sheet1")
ddate = .Range("a1").Value
j = Worksheets.Count
For k = 2 To j
With Worksheets("sheet" & k)
ddate = ddate + 1
.Range("a1") = ddate
End With
Next k
End With
End Sub

                
0