pedie
Well-known Member
- Joined
- Apr 28, 2010
- Messages
- 3,875
<TABLE style="WIDTH: 52pt; BORDER-COLLAPSE: collapse" border=0 cellSpacing=0 cellPadding=0 width=69><COLGROUP><COL style="WIDTH: 52pt; mso-width-source: userset; mso-width-alt: 2523" width=69><TBODY><TR style="HEIGHT: 13.5pt" height=18><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: transparent; WIDTH: 52pt; HEIGHT: 13.5pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0" class=xl63 height=18 width=69 align=right>A1 value = 1/1/2012 </TD></TR><TR style="HEIGHT: 13.5pt" height=18><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: transparent; HEIGHT: 13.5pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0" class=xl63 height=18 align=right>A2 value = 1/1/2011</TD></TR></TBODY></TABLE>
I want to loop and give me all the dates in col a from Jan1 11 to Jan 1 12.
Thanks for helping!
My Current Code:
Code:
[/FONT]
[FONT=Courier New]Sub try()
Dim rw As Long
rw = 3
Do While Cells(rw, 1).Value > Range("A1").Value
Cells(rw, 1).Value = Cells(rw, 1).Offset(-1, 0).Value + 1
rw = rw + 1
Loop
End Sub