+ Reply to Thread
Results 1 to 2 of 2

Last n months formula but respects leap year dates

  1. #1
    Registered User
    Join Date
    03-18-2013
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    8

    Question Last n months formula but respects leap year dates

    Hi,I have a spreadsheet with dates powering a pivot table with a chart to show the last 12months worth of data - whatever data I have in there it should just show last 12 whole months. I had a formula which determined if a date was in the last 12 whole months and it worked fine until this year when Feb 29th came along (leap year!)

    See my attached sheet for the EO month formula I was using.

    Does anyone know a formula to determine if date was in last 12 complete months which can account for the 29 days in Feb this year? I have tried search but cannot locate the answer to this.

    Your help is much appreciated
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2507 (Windows 11 Home 24H2 64-bit)
    Posts
    91,792

    Re: Last n months formula but respects leap year dates

    I think you are mistaken - March 29th happens EVERY year! I know what you meant to say ...

    EDIT: Ah, you corrected yourself!

    I will have a look, but there are functions like EDATE that will take leap years into account.
    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. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

+ 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] 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
  2. Formula for number of months for specific year between two dates
    By KalaiP in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-01-2018, 01:05 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. [SOLVED] Determing if leap year formula
    By mcranda in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-21-2013, 06:30 PM
  5. Excluding the leap year in a date formula
    By babstierney in forum Excel General
    Replies: 4
    Last Post: 08-27-2012, 05:47 AM
  6. Difference in dates but leap year problem
    By FCFalkirk in forum Excel General
    Replies: 3
    Last Post: 03-03-2011, 01:57 PM
  7. Finding Leap Year between 2 dates
    By Boomerj2 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-16-2010, 09:52 AM

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