Closed Thread
Results 1 to 9 of 9

Calendar Off by One Day

  1. #1
    Banned User!
    Join Date
    09-26-2017
    Location
    USA
    MS-Off Ver
    2010
    Posts
    607

    Calendar Off by One Day

    Hello,

    On my 'Select Month View' the calendar days are off by one. Does anyone know why and how to fix please?

    Thank you very much,
    Billy
    Last edited by dominicb; 04-01-2018 at 05:49 PM.

  2. #2
    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. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,444

    Re: Calendar Off by One Day

    So, for Wednesday:

    =IF(WEEKDAY(DATEVALUE(MoMonth&" 1, "&MoYear))=COLUMN(E$1),1,IF(LEN(E4)>0,E4+1,""))

    This is looking for the WEEKDAY function to return 5 (the number of column E), which is the wrong day (5 = Thursday). Because you have added extra columns, the formulae are out of whack. The bit in red must advance by one column only as you copy it across the row.
    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.

  3. #3
    Banned User!
    Join Date
    09-26-2017
    Location
    USA
    MS-Off Ver
    2010
    Posts
    607

    Re: Calendar Off by One Day

    I will give it a go thanks so much. I knew I messed up somewhere.
    Last edited by dominicb; 04-01-2018 at 05:50 PM.

  4. #4
    Banned User!
    Join Date
    09-26-2017
    Location
    USA
    MS-Off Ver
    2010
    Posts
    607

    Re: Calendar Off by One Day

    I made it work but not sure if it's correct:

    B4:

    =IF(WEEKDAY(DATEVALUE(MoMonth&" 1, "&MoYear))=COLUMN(A$1),1,IF(LEN(A4)>0,A4+1,""))

    C4 & D4:

    =IF(WEEKDAY(DATEVALUE(MoMonth&" 1, "&MoYear))=COLUMN(B$1),1,IF(LEN(B4)>0,B4+1,""))

    Then I added one letter for each across.
    Last edited by dominicb; 04-01-2018 at 05:52 PM.

  5. #5
    Forum Expert
    Join Date
    11-27-2007
    Location
    New Jersey, USA
    MS-Off Ver
    2013
    Posts
    1,669

    Re: Calendar Off by One Day

    see attached file.
    It was easy enough to manually fix the formula.
    Attached Files Attached Files
    1. Click on the * Add Reputation if you think this helped you
    2. Mark your thread as SOLVED when question is resolved

    Modytrane

  6. #6
    Banned User!
    Join Date
    09-26-2017
    Location
    USA
    MS-Off Ver
    2010
    Posts
    607

    Re: Calendar Off by One Day

    Thank you modytrane that works great!
    Last edited by dominicb; 04-01-2018 at 05:52 PM.

  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. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,444

    Re: Calendar Off by One Day

    Yes, hard-coding the day numbers is the safest way to do it here. I wanted you to understand what you'd done to cause it to fail, though.

  8. #8
    Banned User!
    Join Date
    09-26-2017
    Location
    USA
    MS-Off Ver
    2010
    Posts
    607

    Re: Calendar Off by One Day

    I appreciate the lesson as always.
    Last edited by dominicb; 04-01-2018 at 05:51 PM.

  9. #9
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Re: Calendar Off by One Day

    Billy Spivy

    This forum exists so that others may learn and benefit from the wisdom provided by others' experiences.
    I have restored your posts in this thread.

    Please do not indulge in the churlish behaviour again.

    Thread locked.

    DominicB

Closed Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 5
    Last Post: 01-02-2020, 07:45 AM
  2. Replies: 0
    Last Post: 11-01-2015, 12:49 PM
  3. Calendar functions - linking work activities with formatted dates to calendar
    By SKSS in forum Access Programming / VBA / Macros
    Replies: 1
    Last Post: 05-14-2012, 06:38 PM
  4. Calendar VBA auto filling week and month based on calendar entry.
    By perrymagic in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-18-2011, 02:00 PM
  5. Replies: 0
    Last Post: 10-31-2011, 10:58 PM
  6. Replies: 0
    Last Post: 03-27-2008, 04:36 PM
  7. [SOLVED] Modify Yearly Calendar to Monthly Calendar Excel 2000?
    By James Cooper in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 07-13-2006, 06:50 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