+ Reply to Thread
Results 1 to 10 of 10

Automating development of calendars of mixed dates and months

  1. #1
    Registered User
    Join Date
    06-27-2017
    Location
    Netherland
    MS-Off Ver
    2013
    Posts
    42

    Automating development of calendars of mixed dates and months

    Dear Experts

    I am trying to develop calendars of mixed months and dates (see attached example).

    1) This calendar starts from Sunday to Saturday;
    2) Each calendar shows 4 weeks (see attached);
    3) Can have days and dates referring to both current and next months;
    4) The last row (week) repeats on the next spreadsheet representing the new 4-weekly calendar and the remaining rows (weeks) are filled with subsequent dates (see the sheet titled "Jan2019-Feb2019".
    5) Dates and months can refer to the previous year (e.g. December refers to 2018 and January dates refer to 2019, etc - see attached);

    Question:
    How to automate these calendars so that they can automatically fill correct dates and months in each subsequent linked sheets correctly for three years?
    (i.e. current year and 2 future years; or partial past year - like above example - and then current 2019 to 2021)

    I appreciate your assistance with my query.

    Simon
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    06-27-2017
    Location
    Netherland
    MS-Off Ver
    2013
    Posts
    42

    Re: Automating development of calendars of mixed dates and months

    Dear All

    Any response to my query? I hope someone there can help.

    Regards,
    Simon

  3. #3
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Automating development of calendars of mixed dates and months

    Please try at
    A5 custom format d
    B5 custom format mmmm

    =EOMONTH(TODAY(),-1)-WEEKDAY(EOMONTH(TODAY(),-1))+INT((COLUMN()-1)/3)+ROWS(A$5:A5)*7-6

    Can't drag formula to the right because of merge cell, you will need to copy to each column.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    06-27-2017
    Location
    Netherland
    MS-Off Ver
    2013
    Posts
    42

    Re: Automating development of calendars of mixed dates and months

    Many thanks Bo_Ry for your help.

    I filled the first sheet with your suggested formula which worked very well, but could not progress correctly to the second sheet in order to fill the dates and months on it.
    I tried to link the last row of the first sheet to the second sheet to guide the new days and months in the second sheet where some dates would be in February (in this example).
    [1] But, I could not get the formula to put the correct dates and months in cells in other rows. What changes in the formula are required to solve the problem?
    [2] Also, if I use just one cell for the name of the months (mmmm)instead of currently two merged cells, then what adjustments to the formula is needed?

    I appreciate your further comments so that I can automate the calendar in all sheets in my workbook.

    Best Regards,

    Simon

  5. #5
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Automating development of calendars of mixed dates and months

    Please upload your sheet that relates to your question.

  6. #6
    Registered User
    Join Date
    06-27-2017
    Location
    Netherland
    MS-Off Ver
    2013
    Posts
    42

    Re: Automating development of calendars of mixed dates and months

    Hi Bo_Ry

    Thanks for reply. please see the attached (v2 of the file before containing your suggested formula and other linked sheets).

    The first row of the second tab is linked to the last row of the first tab; the first row of the third tab is linked to the last row of the second tab; and so on.

    How to adjust the formula to work based on the cells' data in the first row of second, third, fourth, . . . tabs?

    Best Regards,
    Simon
    Attached Files Attached Files

  7. #7
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Automating development of calendars of mixed dates and months

    Please try at C1
    =MID(CELL("filename",C1),FIND("]",CELL("filename"))+1,7)

    A5 drag acoss, fill without formating and drag down
    =EOMONTH($C$1,0)-WEEKDAY(EOMONTH($C$1,0))+INT((COLUMN()-1)/2)+ROWS(A$5:A5)*7-6

    Copy C1 and A5:N8 to next sheet
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    06-27-2017
    Location
    Netherland
    MS-Off Ver
    2013
    Posts
    42

    Re: Automating development of calendars of mixed dates and months

    Hi Bo_Ry

    Indeed I am thankful for your reply. We are getting closer to the solution but not yet there.

    Is it possible to change the content of the cell "C1" instead of "Dec2018" in sheet one, or "Jan2019" "Feb2019" in other sheets to a given day, month and year?
    For example instead of "Dec2018", the formula refers to a given full date of "30Dec2018", or in the second sheet it refers to "20Jan2019", or in the third sheet it refers to "10Feb2019", etc.
    This way I can build a 30 days calendar which starts from the date written in the cell "C1".

    My aim is to have a custom made calendar so that the last week of the previous month (i.e. the last row of the calendar in sheet one becomes the first week of
    the second sheet calendar. Likewise, the last week (last row) of the dates in the second sheet becomes the first week of the third sheet calendar. Please see the excel v2 file which I attached to my last email.

    I think, if you help me by a solution that the calendar can be completed automatically based on a starting date which is specified in cell C1 then the problem is solved.

    I look forward to your receiving your suggestion.

    Best Regards,
    Simon

  9. #9
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,463

    Re: Automating development of calendars of mixed dates and months

    Try to type the starting date in cell B1 of first sheet.
    Copy to 2nd sheet, correct the formula in cell A5
    Similar to 3rd sheet...
    ...
    Attached Files Attached Files
    Quang PT

  10. #10
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Automating development of calendars of mixed dates and months

    Maybe this

    Sheet1 C1 = 30/12/2018

    A5:N8
    =$C$1-WEEKDAY($C$1)+INT((COLUMN()-1)/2)+ROWS(A$5:A5)*7-6

    Sheet2
    C1 =INDIRECT("sheet"&SHEET()-1&"!A8")
    A5:N8 paste from sheet1

    New sheet3
    Paste A1:N8 from sheet2

    Sheet name must in order from Sheet1,2…, otherwise, you will need to key in every C1 on the other sheet or use VBA.

    In sheet ALL

    C5:N8
    =$C$1-WEEKDAY($C$1)+INT((COLUMN()-1)/2)+(MOD(ROWS(A$5:A5),5)+INT((ROWS(A$5:A5)-1)/5)*4)*7-6

    You can select C4:N8 and drag down, this will create calendars of 4 weeks in the same sheet.
    Attached Files Attached Files

+ 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] Conditional Format - Dates greater than 18 months and 24 months
    By amandavan in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 04-03-2024, 04:08 PM
  2. Having trouble making dates and calendars work
    By johnw993 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-27-2018, 08:06 AM
  3. Replies: 8
    Last Post: 02-20-2014, 05:46 PM
  4. Replies: 3
    Last Post: 06-02-2008, 06:28 PM
  5. How to calculate months from mixed data
    By aeswaran in forum Excel General
    Replies: 1
    Last Post: 12-14-2006, 12:00 PM
  6. Adding months to dates should account for 28-30-31 day months
    By Graham in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-01-2006, 08:10 AM
  7. [SOLVED] EXCEL, I want to create a series of calendars with dates marked f.
    By ISO9000 in forum Excel General
    Replies: 0
    Last Post: 02-22-2005, 07:06 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