+ Reply to Thread
Results 1 to 7 of 7

Automatically create dates when changing weeks

  1. #1
    Registered User
    Join Date
    07-01-2010
    Location
    Australia
    MS-Off Ver
    Excel 2013
    Posts
    44

    Automatically create dates when changing weeks

    I have a work roster, I am trying to automatically re-populate dates in cells Saturday through to Friday when I change cell B3 which is
    the week I'm in, currently is 1, when I change B3 to 2 (week 2) I need the dates to change to correct dates as shown in sample spreadsheet, see attached,
    also once I get to the end of the 12 week roster I change week to week 1 and the date should carry on from week 12.



    cheers
    Mike T
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    09-25-2015
    Location
    Milan Italy
    MS-Off Ver
    office 365
    Posts
    1,784

    Re: Automatically create dates when changing weeks

    C3=IFERROR(AGGREGATE(15,6,ROW(INDIRECT($N$2&":"&$O$2))/(WEEKNUM(ROW(INDIRECT($N$2&":"&$O$2)),16)=$B$3),COLUMNS($C$2:C2)),"")

    Copy across
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    07-01-2010
    Location
    Australia
    MS-Off Ver
    Excel 2013
    Posts
    44

    Re: Automatically create dates when changing weeks

    Quote Originally Posted by CARACALLA View Post
    C3=IFERROR(AGGREGATE(15,6,ROW(INDIRECT($N$2&":"&$O$2))/(WEEKNUM(ROW(INDIRECT($N$2&":"&$O$2)),16)=$B$3),COLUMNS($C$2:C2)),"")

    Copy across
    Hi Caracalla, your formula works great for the length of the rotating roster which is 12 weeks but when I change week back to week 1 to start a new 12 week roster
    the date goes back to 01-Jan-22 where date should carry on from week 12 should read 26-Mar-22 not 01-Jan-22. hope its an easy fix for you, thanx again your help is much appreciated

    look forward to your reply


    cheers
    Mike

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,594

    Re: Automatically create dates when changing weeks

    Excel would have to have some way of knowing that the week is week 1 of the second period of time.
    Perhaps the following will help:
    1. Select the period (1,2,3,4,5) in cell A3
    2. Paste the following formula into cell A4: =B3+12*(A3-1)
    3. Modify CARACALLA's formula to read: =IFERROR(AGGREGATE(15,6,ROW(INDIRECT($N$2&":"&$O$2))/(WEEKNUM(ROW(INDIRECT($N$2&":"&$O$2)),16)=$A4),COLUMNS($C$2:C2)),"")
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  5. #5
    Valued Forum Contributor
    Join Date
    07-23-2013
    Location
    London, England
    MS-Off Ver
    Office 365
    Posts
    988

    Re: Automatically create dates when changing weeks

    If Week 1 start date is in N2 (manual input), try:

    =$N$2+7*($B3-1)+COLUMN(C3)-3

  6. #6
    Registered User
    Join Date
    07-01-2010
    Location
    Australia
    MS-Off Ver
    Excel 2013
    Posts
    44

    Re: Automatically create dates when changing weeks

    Thanx you guys, between Caracalla, JetMc and nick.williams, you guys were able to solve my date issue

    thanx again, you guys are fantastic


    Cheers
    Mike T

  7. #7
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,594

    Re: Automatically create dates when changing weeks

    You're Welcome. Thank You for the feedback and for marking the thread as 'Solved'. I hope that you have a blessed day.

+ 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. Changing Weeks, to Update Values Automatically
    By vill in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-30-2017, 02:03 PM
  2. Dividing monthly values into weeks automatically (some months have 5 weeks)
    By massimoo in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-07-2012, 03:20 AM
  3. Replies: 3
    Last Post: 02-09-2012, 06:57 PM
  4. Replies: 5
    Last Post: 06-21-2011, 09:10 AM
  5. difference between two dates in working weeks(5 day weeks)
    By AWilderbeast in forum Excel General
    Replies: 3
    Last Post: 08-31-2010, 09:21 AM
  6. changing cell dates automatically
    By jonfouk in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-22-2008, 04:46 PM
  7. [SOLVED] Dates Changing Automatically When Copied
    By M Imran Buhary in forum Excel General
    Replies: 4
    Last Post: 04-16-2006, 04:15 AM

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