filling every 23 rows

Peterfc2

Active Member
Joined
Jan 2, 2004
Messages
394
Office Version
  1. 2013
Platform
  1. Windows
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)
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
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
 
Upvote 0

Forum statistics

Threads
1,214,974
Messages
6,122,536
Members
449,088
Latest member
RandomExceller01

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top