+ Reply to Thread
Results 1 to 4 of 4

If(leap year) formula

  1. #1
    Registered User
    Join Date
    12-31-2020
    Location
    USA
    MS-Off Ver
    Office 2019
    Posts
    44

    If(leap year) formula

    I apologize for the many tabs. Most of my formulas and formatting are connected to the previous tab/Jun-Jul tab). I am working in tab Feb-Mar & Mar-Apr. I have created a IF LEAP YEAR formula that works great when my WORKSHEET is 2023-2024 but when it is a non leap year, the formula doesn't display " ". I have tried swapping my [value_if_true] & [value_if_false] criteria. That works for a non-leap year but not 2024. What am I doing wrong?

    The timesheet dates go from 16th-15th.

    I am working in cells (highlighted in RED):

    Feb-Mar: B37 & B38
    Mar-Apr: C8
    Attached Files Attached Files

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,724

    Re: If(leap year) formula

    Change the formula in C36 of the Feb-Mar sheet to this:

    =IF(MONTH(DATE(YEAR(C8),2,29))=2,SUM(C35+1),"")

    and change C8 of the Mar-Apr sheet to this:

    =IF(MONTH(DATE(YEAR('Feb-Mar'!C8),2,29))=2,SUM('Feb-Mar'!C36+1),SUM('Feb-Mar'!C35+1))

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    12-31-2020
    Location
    USA
    MS-Off Ver
    Office 2019
    Posts
    44

    Re: If(leap year) formula

    Thank you Pete. That fixed my problem. Glad it was a simple fix.

    Hope you have a great day!

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,724

    Re: If(leap year) formula

    Glad to help - thanks for the rep.

    Pete

+ 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. Last n months formula but respects leap year dates
    By simonsays1979 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-03-2020, 06:52 AM
  2. [SOLVED] Auto populate calendar with Leap Year and Non-Leap year.
    By sickreto in forum Excel General
    Replies: 11
    Last Post: 12-05-2019, 01:46 PM
  3. Leap Year causing Formula to Return 1 day too soon
    By heresteve2 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-14-2016, 11:25 AM
  4. Cell formula for last day of February for leap year or not
    By mikeburg in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-27-2014, 02:45 AM
  5. [SOLVED] Determing if leap year formula
    By mcranda in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-21-2013, 06:30 PM
  6. Excluding the leap year in a date formula
    By babstierney in forum Excel General
    Replies: 4
    Last Post: 08-27-2012, 05:47 AM
  7. Adjusting rolling 12 month formula for leap year
    By lee586 in forum Excel General
    Replies: 4
    Last Post: 03-12-2012, 03:45 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