filling every 23 rows

Peterfc2

Active Member
Joined
Jan 2, 2004
Messages
378
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

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.

mrmmickle1

Well-known Member
Joined
May 11, 2012
Messages
2,461
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
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,627
Messages
5,838,444
Members
430,548
Latest member
hh_dh2001

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
Top