+ Reply to Thread
Results 1 to 7 of 7

Incremental date increase by 7 days with autofill in formula

  1. #1
    Registered User
    Join Date
    08-10-2023
    Location
    USA
    MS-Off Ver
    MS Office 365
    Posts
    3

    Incremental date increase by 7 days with autofill in formula

    Greetings
    I'm a somewhat new excel user. Almost zero formula knowledge.

    I need the formula to increase the dates by 7 as I drag cell in a row.

    Example:
    =COUNTIFS('Schedule-TM'!$Y:$Y,">="&DATE(2022,12,12),'Schedule-TM'!$Y:$Y,"<="&DATE(2022,12,18))

    =COUNTIFS('Schedule-TM'!$Y:$Y,">="&DATE(2022,12,19),'Schedule-TM'!$Y:$Y,"<="&DATE(2022,12,25))

    =COUNTIFS('Schedule-TM'!$Y:$Y,">="&DATE(2022,12,26),'Schedule-TM'!$Y:$Y,"<="&DATE(2023,1,1))

    In the attached file, on tab "Dates" in cell B3, I want the dates to increase by 7 days, and if possible, the formula needs to span into the next year. These dates can be found on the tab "Schedule".

    I looked into using a table, that was a deep rabbit hole that led me to the land of confusion.
    Attached Files Attached Files

  2. #2
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Incremental date increase by 7 days with autofill in formula

    the output in cell B3 of the dates tab is 2, is this correct and then you want the result in C3 to be 9?
    Last edited by Sam Capricci; 08-11-2023 at 01:56 PM.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  3. #3
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,947

    Re: Incremental date increase by 7 days with autofill in formula

    On Dates, enter your starting date in cell A1 - 12/12/2022.

    Then, in B3, enter this formula

    =COUNTIFS(Schedule!$A:$A,">="&$A$1+7*(COLUMN()-2),Schedule!$A:$A,"<="&$A$1+6 +7*(COLUMN()-2))

    and then copy to the right.

    If you don't want to ever change the starting date, then you can use

    =COUNTIFS('Schedule-TM'!$Y:$Y,">="&DATE(2022,12,12 +7*(COLUMN()-2)),'Schedule-TM'!$Y:$Y,"<="&DATE(2022,12,18 +7*(COLUMN()-2)))
    Last edited by Bernie Deitrick; 08-11-2023 at 02:12 PM.
    Bernie Deitrick
    Excel MVP 2000-2010

  4. #4
    Registered User
    Join Date
    08-10-2023
    Location
    USA
    MS-Off Ver
    MS Office 365
    Posts
    3

    Re: Incremental date increase by 7 days with autofill in formula

    Thanks Bernie

    Not exactly. I need to provide you more info.
    I need to count dates in column A based on date ranges according to a calendar that numbers each work week.
    Example, work week 50 is "Dec 12 2022 thru Dec 18 2022".

    When I drag cell B3 one cell to the right I need the date to change to reflect "Dec 19 2022 thru Dec 25 2022" (work week 51).
    Drag again and the formula changes to show "Dec 26 2022 thru Jan 01 2023"

    I saw a google post about something similar where they attempted to use a table (pivot) but my eyes glazed over.

    Thanks and I hope I explained this correctly.

    Don

  5. #5
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,947

    Re: Incremental date increase by 7 days with autofill in formula

    To do the counting, you need to use my formula - that is just date math. To create headings starting in column B, you would use

    =TEXT($A$1+7*(COLUMN()-2), "mmm dd yyyy" & " thru " & TEXT(A$1+6 +7*(COLUMN()-2),"mmm dd yyyy"

    and copy that across the row.

  6. #6
    Registered User
    Join Date
    08-10-2023
    Location
    USA
    MS-Off Ver
    MS Office 365
    Posts
    3

    Re: Incremental date increase by 7 days with autofill in formula

    Good morning

    My bad. Your formula works exactly as I need it to. I was expecting to see the dates change in the formula bar, base
    on how I had originally created my formula.
    Your help has saved me hours of manually inputting in the dates because my master forecast schedule goes out several years.

    Thanks again Bernie

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,929

    Re: Incremental date increase by 7 days with autofill in formula

    There is no 2020 version of Excel - please update your forum profile with the version you have.

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, if you have not already done so, you may not be aware that you can thank anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of all those who offered help.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Incremental increase in a formula
    By snookerguru in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 03-04-2023, 12:32 AM
  2. Incremental increase in date in formula
    By mgsc in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 12-16-2019, 10:15 AM
  3. [SOLVED] Incremental increase formula
    By allgeef in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 05-09-2018, 10:57 PM
  4. [SOLVED] Formula for incremental increase of count
    By BRISBANEBOB in forum Excel General
    Replies: 3
    Last Post: 09-15-2016, 09:21 AM
  5. Replies: 2
    Last Post: 05-19-2016, 03:49 PM
  6. [SOLVED] Incremental Date Increase in Body of Text Using Word
    By golfervaughan in forum Word Formatting & General
    Replies: 6
    Last Post: 07-17-2012, 10:27 AM
  7. Formula for incremental increase
    By alexrm in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-07-2005, 06:05 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1