filling every 23 rows

Peterfc2

Active Member
Joined
Jan 2, 2004
Messages
356
A1 holds a date 16/08/2014

A2 to A22 should be blank etc
A23 should be 23/08/2014 (Date +7 days)
A24 to A46 blank
A47 should be 30/08/2014 (Date +14 days)

etc for 40 weeks

Should know how to do this and fill down but my minds gone blank (pun)
 

Some videos you may like

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.

mrmmickle1

Well-known Member
Joined
May 11, 2012
Messages
2,456
Maybe something like this:

Code:
[COLOR=#0000ff]Sub[/COLOR] TestDateFill()

 [COLOR=#0000ff]   Dim [/COLOR]b [COLOR=#0000ff]As Long[/COLOR]
[COLOR=#0000ff]    Dim[/COLOR] i [COLOR=#0000ff]As Long[/COLOR]
    
    b = 7
[COLOR=#0000ff]    For[/COLOR] i = 23 To 920 [COLOR=#0000ff]Step[/COLOR] 23
        Cells(i, 1).Value = Cells(1, 1).Value + b
        b = b + 7
  [COLOR=#0000ff]  Next [/COLOR]i
    
[COLOR=#0000ff]End Sub[/COLOR]

Assuming A1 = 16/08/2014
 

Watch MrExcel Video

Forum statistics

Threads
1,109,518
Messages
5,529,311
Members
409,862
Latest member
lbisacca
Top