View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Leith Ross[_58_] Leith Ross[_58_] is offline
external usenet poster
 
Posts: 1
Default How can I make For-Next loop with date?


Hello GreenInIowa,

This example will list the dates in column A of the worksheet. I wasn't
sure about the incrementing by day part. Did you mean by day of the week
or day of the month?


Sub LoopDate()

Dim I
Dim R As Long

For I = CVDate("07/01/2001") To CVDate("8/12/2005")
R = R + 1
Cells(R, 1).Value = I
Next I

End Sub


This should help get you going.

Sincerely,


--
Leith Ross


------------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465
View this thread: http://www.excelforum.com/showthread...hreadid=476116