Closed Thread
Results 1 to 6 of 6

Formula for Shift Roster being thrown off by leap years?

  1. #1
    Registered User
    Join Date
    06-18-2020
    Location
    Sydney
    MS-Off Ver
    2016
    Posts
    8

    Formula for Shift Roster being thrown off by leap years?

    I've been trying to create a shift leave roster for work, which works around a 4 year revolving roster. I want to be able to input a year at the top and have it adjust accordingly for all future years but every time i put in a leap year it throws the answer off by 1.

    This is what I currently have in C14:

    Please Login or Register  to view this content.
    Capture.PNG

  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. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,369

    Re: Formula for Shift Roster being thrown off by leap years?

    There are instructions at the top of the page explaining how to attach your sample workbook.
    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
    Registered User
    Join Date
    06-18-2020
    Location
    Sydney
    MS-Off Ver
    2016
    Posts
    8

    Re: Formula for Shift Roster being thrown off by leap years?

    Here is the Spreadsheet
    Attached Files Attached Files

  4. #4
    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
    79,369

    Re: Formula for Shift Roster being thrown off by leap years?

    Explain the date in B13 - why 2010?

    What result are you expecting and why?

    Explain in WORDS what you ware expecting your formula to do.
    Last edited by AliGW; 07-06-2020 at 02:12 AM.

  5. #5
    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
    79,369

    Re: Formula for Shift Roster being thrown off by leap years?

    Give this a try:

    =MID($B14,MOD(DATEDIF($B$13,C$13,"m")/12,4)+1,1)

  6. #6
    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
    79,369

    Re: Formula for Shift Roster being thrown off by leap years?

    Administrative Note:

    Unfortunately, this is a duplicate thread, and you are allowed only ONE thread per issue here.

    Please see Forum Rule #5 about thread duplication.

    I am closing this thread, but you may continue here in the original thread: https://www.excelforum.com/excel-for...-function.html

Closed Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Day and Shift wise allocation from Roster / employee shift schedule
    By Ravi_Kadu in forum Excel Programming / VBA / Macros
    Replies: 22
    Last Post: 01-11-2021, 07:40 PM
  2. Formula for shift roster
    By octjan in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-18-2018, 11:44 AM
  3. [SOLVED] Age based on DOB; Accounts for leap years. Years old if >2, Months if <2 years old.
    By sharpmel in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 01-17-2013, 04:20 PM
  4. Dates and Leap Years
    By JEA in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 10-05-2011, 11:03 PM
  5. How to create simple formula in Excel for shift roster
    By Mahaveer in forum Excel General
    Replies: 2
    Last Post: 10-29-2010, 01:39 PM
  6. [SOLVED] How does Excel allow for leap years?
    By Neil in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-12-2006, 04:20 AM
  7. DATEDIF and leap years
    By Leyland in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 07-21-2005, 03: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