+ Reply to Thread
Results 1 to 6 of 6

Count how many dates are this month, 2 months and 3 months old

  1. #1
    Forum Contributor
    Join Date
    10-30-2006
    MS-Off Ver
    O365
    Posts
    311

    Count how many dates are this month, 2 months and 3 months old

    Hi all,
    I have this formula
    Please Login or Register  to view this content.
    which counts how many dates it finds this current month.

    I'm trying to figure out how to edit this so i can use it to count for all dates last month. And then i'll need another that counts dates from 2 months ago, but i'm sure i could work that out once i have a code for last month.

    Any ideas?

    Stuart

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,147

    Re: Count how many dates are this month, 2 months and 3 months old

    Try


    =COUNTIFS(D1:D3,">="&EOMONTH(TODAY(),-2)+1,D1:D3,"<="&EOMONTH(TODAY(),-1))

    will give results for May

  3. #3
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,899

    Re: Count how many dates are this month, 2 months and 3 months old

    Count for all dates last month:


    =COUNTIFS(D1:D3,">="&EOMONTH(TODAY(),-2)+1,D1:D3,"<="&EOMONTH(TODAY(),-1))

  4. #4
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,210

    Re: Count how many dates are this month, 2 months and 3 months old

    Please Login or Register  to view this content.
    these are the bits you need to change, last month is -2 and -1
    2 months ago are -3 and -2

  5. #5
    Forum Contributor
    Join Date
    10-30-2006
    MS-Off Ver
    O365
    Posts
    311

    Re: Count how many dates are this month, 2 months and 3 months old

    That's great guys! Thanks for the help

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,147

    Re: Count how many dates are this month, 2 months and 3 months old

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ 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] Conditional Format - Dates greater than 18 months and 24 months
    By amandavan in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 04-03-2024, 04:08 PM
  2. [SOLVED] Count of months against current month
    By JCStewartNZ in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-01-2015, 06:37 AM
  3. Replies: 2
    Last Post: 03-19-2014, 07:26 PM
  4. Replies: 8
    Last Post: 02-20-2014, 05:46 PM
  5. Replies: 2
    Last Post: 06-21-2012, 08:17 PM
  6. Rounding Dates up to the last day of the month & adding 11 months
    By EPeterson in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-12-2011, 07:57 PM
  7. Adding months to dates should account for 28-30-31 day months
    By Graham in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-01-2006, 08:10 AM

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