+ Reply to Thread
Results 1 to 21 of 21

How to auto-populate sequential dates on multiple tabs?

  1. #1
    Registered User
    Join Date
    05-26-2016
    Location
    Melbourne, Australia
    MS-Off Ver
    2016
    Posts
    13

    How to auto-populate sequential dates on multiple tabs?

    Hi,

    I'm not an experienced programmer or excel user.
    I've learned enough from searching to understand a bit about the module and code reading.
    I'd like to see if someone can help with this...

    I've created a weekly log to track my activities.
    52 tabs for 52 weeks.

    Is it possible to auto-fill the same spaces [B7-B13] across all the tabs with the correct sequential dates?

    On each tab, Monday starts on B7 till Sunday on B13.
    The format I'm using for dates is: [$-en-AU]dddd, d-mmm-yy format

    This is an example of what my dates look like in a tab:

    Monday, 2-Jan-17
    Tuesday, 3-Jan-17
    Wednesday, 4-Jan-17
    Thursday, 5-Jan-17
    Friday, 6-Jan-17
    Saturday, 7-Jan-17
    Sunday, 8-Jan-17

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: How to auto-populate sequential dates on multiple tabs?

    If you are willing to use a helper cell on each page to indicate which week it is (in this example, cell A1), you can use the formula
    =DATE(2017,1,ROW()-5)+($A$1-1)*7 in Cell B7 and copy it down to cell B13. Duplicate this formula on all 52 sheets.
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: How to auto-populate sequential dates on multiple tabs?

    Hi, welcome to the forum

    I would 1st question the need for 1 sheet for each week? Excel works best if all data is onteh same sheet. Not to say that it cannot work the way you are doing it, but it may not be the most efficient way to do things.

    What exactly do you have, and what are you trying to do here?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Registered User
    Join Date
    05-26-2016
    Location
    Melbourne, Australia
    MS-Off Ver
    2016
    Posts
    13

    Re: How to auto-populate sequential dates on multiple tabs?

    Hi,

    Thanks for the replies.

    @dflak
    I'm currently populating the dates by putting in the first date for the week and then dragging it down till Sunday. I did this for this year, but I thought there surely has to be a better way.

    @FDibbins
    Thanks. Looking forward to learning from others here!
    It's a sales activity report and I chose to have each week on a different tab b/c I write notes at the bottom and forward each week to my mentor. I'm including a copy of the excel document below.

    Can I create a module of some kind and have it auto-populate the correct dates across all 52 weeks?
    Attached Files Attached Files

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: How to auto-populate sequential dates on multiple tabs?

    Thanks for the file.

    Try this...
    1. in sheet1 B7, enter your start date (like you have)
    2. in B8 use =B7+1
    3. copy that down
    4. in sheet 2 B7 enter this...
    =INDIRECT(MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255)-1&"!B13")+1
    5. Repeat 2 and 3
    6. Now copy B7:B13 from sheet2 and paste to all the other sheets

  6. #6
    Registered User
    Join Date
    05-26-2016
    Location
    Melbourne, Australia
    MS-Off Ver
    2016
    Posts
    13

    Re: How to auto-populate sequential dates on multiple tabs?

    FDibbins,

    Currently I'm doing something with the similar effect...dragging the first date till the last day, Sunday, and it's populating that way. I'm doing each tab this way.

    Your idea would work in the similar way.

    I'd like to see if there is a way to bypass all that and have a formula or something that would take care of the whole workbook, rather than doing each one individually.

    If not, the manual way is always an option.

  7. #7
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,523

    Re: How to auto-populate sequential dates on multiple tabs?

    Is this what you wanted?
    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    05-26-2016
    Location
    Melbourne, Australia
    MS-Off Ver
    2016
    Posts
    13

    Re: How to auto-populate sequential dates on multiple tabs?

    @jindon

    Yes.
    Thank you.

    I'd like to do this for the 2017-2018/2018-2019...etc.
    How can I adjust the date the code starts from?

  9. #9
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,523

    Re: How to auto-populate sequential dates on multiple tabs?

    Please Login or Register  to view this content.
    The bold part is the start date, 2017(Year(Date)/1(Jan)/2 in this case
    So Change that part as you want like 2018,1,2

  10. #10
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: How to auto-populate sequential dates on multiple tabs?

    If you are comfortable with formulas.
    In B7 of any tab
    Please Login or Register  to view this content.
    In B8
    =B7+1
    then drag down till B13
    Attached Files Attached Files

  11. #11
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: How to auto-populate sequential dates on multiple tabs?

    Quote Originally Posted by natureExcel View Post
    FDibbins,

    Currently I'm doing something with the similar effect...dragging the first date till the last day, Sunday, and it's populating that way. I'm doing each tab this way.

    Your idea would work in the similar way.

    I'd like to see if there is a way to bypass all that and have a formula or something that would take care of the whole workbook, rather than doing each one individually.

    If not, the manual way is always an option.
    Once you have done week 2, you can do a "group: copy to the others.

    Highlight the range in sheet2 and copy
    go to sheet3 B7
    hold shift and scroll, then click, on sheet 52 - this will group all those sheets
    now Paste, and it should paste that range to all sheets

  12. #12
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: How to auto-populate sequential dates on multiple tabs?

    Quote Originally Posted by natureExcel View Post
    @jindon

    Yes.
    Thank you.

    I'd like to do this for the 2017-2018/2018-2019...etc.
    How can I adjust the date the code starts from?
    with my suggestion, all you do is change the start date on on sheet 1 to 1/1/2017 and it will carry all the way through the other sheets

  13. #13
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: How to auto-populate sequential dates on multiple tabs?

    Here is the code.
    Keep a worksheet with all formats. Run the macro. It will generate all the 52 sheets.
    Pl see attached file for demonstration.

    Please Login or Register  to view this content.
    Attached Files Attached Files

  14. #14
    Registered User
    Join Date
    05-26-2016
    Location
    Melbourne, Australia
    MS-Off Ver
    2016
    Posts
    13

    Re: How to auto-populate sequential dates on multiple tabs?

    Thank you @Fdibbins, @jindon, @dflak, and @kvsrinivasamurthy for all the help.

  15. #15
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,523

    Re: How to auto-populate sequential dates on multiple tabs?

    re: Your PM
    Please Login or Register  to view this content.

  16. #16
    Registered User
    Join Date
    05-26-2016
    Location
    Melbourne, Australia
    MS-Off Ver
    2016
    Posts
    13

    Re: How to auto-populate sequential dates on multiple tabs?

    This variation of the code worked.

    edit: any concerns with this way?

    Please Login or Register  to view this content.

  17. #17
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,523

    Re: How to auto-populate sequential dates on multiple tabs?

    Did you see my previous post?

    If you can change the year directly for yourself and happy with that, just ignore my previous post.

    Please Login or Register  to view this content.

  18. #18
    Registered User
    Join Date
    05-26-2016
    Location
    Melbourne, Australia
    MS-Off Ver
    2016
    Posts
    13

    Re: How to auto-populate sequential dates on multiple tabs?

    Both work.
    How can I change the day the first day starts on?

  19. #19
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,523

    Re: How to auto-populate sequential dates on multiple tabs?

    DateSerial(Year, Month, Day)

    If 2018/1/4 then DateSerial(2018,1,4)

  20. #20
    Registered User
    Join Date
    05-26-2016
    Location
    Melbourne, Australia
    MS-Off Ver
    2016
    Posts
    13

    Re: How to auto-populate sequential dates on multiple tabs?

    Thank you.

  21. #21
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: How to auto-populate sequential dates on multiple tabs?

    Im happy you got this resolved and thanks for the feedback

+ 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. [SOLVED] Creating a sequential date over multiple tabs.
    By Snookem in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 09-09-2020, 12:04 AM
  2. Replies: 1
    Last Post: 03-09-2016, 06:39 AM
  3. [SOLVED] Formula to auto populate cells to match multiple tabs with certain criteria
    By rowena229 in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 03-18-2015, 04:42 PM
  4. Auto-populate a worksheet from multiple worksheets, based on unspecified dates.
    By colinirving99 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-19-2014, 03:12 PM
  5. auto populate between tabs
    By smatt26 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-10-2013, 12:48 AM
  6. Auto Populate to Multiple Tabs Macro?
    By Desert Jay in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-30-2011, 11:59 AM
  7. Sequential Ordering on multiple tabs
    By scottsoo9 in forum Excel General
    Replies: 6
    Last Post: 06-08-2011, 12:43 PM

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