+ Reply to Thread
Results 1 to 7 of 7

Count dates that only a year old

  1. #1
    Registered User
    Join Date
    06-19-2013
    Location
    United States
    MS-Off Ver
    Excel 2007, 2010, 2013
    Posts
    41

    Count dates that only a year old

    Greetings,
    Maybe I missed the answer but need help in applying a formula to only count dates that are within the last year. My data is pulled from SharePoint Lists then using another tab I am able to count how many items are done based on each section (currently have 5 different sections)
    The formula I am using is:

    COUNTIFS(Table1[Section],”Section”,Table1[Safety],”<>”)

    I would like it to only count the dates in Safety that are within the last year when the sheet is refreshed.

    Any help will be greatly appreciated.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: Count dates that only a year old

    You need to include another criteria that tests for >= EDATE(TODAY(),-12)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    06-19-2013
    Location
    United States
    MS-Off Ver
    Excel 2007, 2010, 2013
    Posts
    41

    Re: Count dates that only a year old

    If I understand correctly my formula should then look like:

    COUNTIFS(Table1[Section],”Section”,Table1[Safety],”<>”,Table1[Safety],">=EDATE(TODAY(),-12")

    However that did not work.

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Count dates that only a year old

    Try it like this...

    =COUNTIFS(Table1[Section],"Section",Table1[Safety],"<>",Table1[Safety],">="&EDATE(TODAY(),-12))
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  5. #5
    Registered User
    Join Date
    06-19-2013
    Location
    United States
    MS-Off Ver
    Excel 2007, 2010, 2013
    Posts
    41

    Re: Count dates that only a year old

    Thanks Tony, still did not work. I know the answer should be 1 out of the 2 dates entered in the table for each of the sections.

  6. #6
    Registered User
    Join Date
    06-19-2013
    Location
    United States
    MS-Off Ver
    Excel 2007, 2010, 2013
    Posts
    41

    Re: Count dates that only a year old

    Nevermind Tony. It did work. I just forgot to include () after today.

    Thank you both; Ford and Tony; very much.

  7. #7
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Count dates that only a year old

    Good deal! Thanks for the feedback!

+ 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. Replies: 2
    Last Post: 03-09-2012, 11:01 AM
  2. How to count dates assuming that the year changes?
    By Zsidat in forum Excel General
    Replies: 5
    Last Post: 03-08-2012, 06:34 PM
  3. Excel 2007 : Count based on year in a row of dates
    By Dadoo in forum Excel General
    Replies: 10
    Last Post: 01-24-2011, 10:08 PM
  4. [SOLVED] Colomn of various dates, count & give % of all under 1 year, etc.
    By SooHunter in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-22-2006, 01:36 PM
  5. count dates within range by year and month
    By Isaiah25 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 05-04-2005, 06: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