Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Some one tried to help me with this, but did not worked, so sorry for
reposting My Original Message I would like to see today's date in column A everyday in new cell, maintaining previous cell with yesteray's date and previous before previous cell with day before yesterday's date and so on. So every weekday you see today's date in the cell. e.g 08/20/2007 08/21/2007 08/22/2007 Today Will show up tomorrow as 8/23/2007 Will show up Friday as 8/24/2007 Will be one blank row for saturday & Sunday Will show up Monday as 8/27/2007 Thanks AM The answer was Dim mLastRow As Integer Dim mdate As Date mdate = Date If Weekday(mdate) 1 Then mLastRow = Range("A65000").End(xlUp).Row + 2 Else mLastRow = Range("A65000").End(xlUp).Row + 1 Range("A" & mLastRow).Value = mdate End If This will automatically check for saturday and sunday and will skip a row while inseting new date. I have tested this. Hope this helps!! But for some reason ot does not work for me, Any further help would be greatly appriciated. Thanks AM |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to autofill cell with today's date on edit | Excel Discussion (Misc queries) | |||
How do a set the current date to change in cell everyday | Excel Discussion (Misc queries) | |||
How do a set the current date to change in cell everyday | Excel Discussion (Misc queries) | |||
Display Date that does not change everyday. | Excel Discussion (Misc queries) | |||
Autofill today's date Everyday | Excel Programming |