+ Reply to Thread
Results 1 to 3 of 3

COUNTIF between two dates and also before today's date

  1. #1
    Registered User
    Join Date
    02-16-2012
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    9

    COUNTIF between two dates and also before today's date

    Is there a formula for COUNTIF where I can count the number of entries BETWEEN two dates but also BEFORE today's date?

    For example, I have this table:

    Training Schedule
    Training Location Training Date
    A 2012/01/25
    B 2012/01/26
    C 2012/02/28
    D 2012/02/29
    E 2012/03/01
    F 2012/03/27
    G 2012/03/28
    I 2012/03/29
    J 2012/04/24
    K 2012/04/25
    L 2012/05/02
    M 2012/05/03
    N 2012/05/24
    O 2012/06/20
    P 2012/08/29
    Q 2012/08/30
    R 2012/10/23

    And I have this quarter guide:

    Quarter Guide 2011-2012
    Quarter Start Date Quarter
    1/1/2011 2011 - Q1
    4/1/2011 2011 - Q2
    7/1/2011 2011 - Q3
    10/1/2011 2011 - Q4
    1/1/2012 2012 - Q1
    4/1/2012 2012 - Q2
    7/1/2012 2012 - Q3
    10/1/2012 2012 - Q4

    So basically I need to calculate the # of workshops in each quarter that have been delivered before today's date (and are not just scheduled). Determining the number of trainings scheduled is fine but I can't figure out a countif or sumproduct (or whatever) where I can count the number of trainings in each quarter that have occurred before today's date. Right now I have manually entered 8 but I want it to be automated. So like on May 1, Quarter 2 should read "2"... then on May 4, Quarter 2 should read "4" for delivered based on the training schedule:

    Q1 Q2 Q3 Q4 Total
    Total Number of Trainings Scheduled By Quarter 8 6 2 1 17
    Total Number of Trainings Delivered by Quarter 8 0 0 0 8

    I tried a formula like this COUNTIFS(Table1[Training Date],">="&F7, Table1[Training Date],"<="&F8) where F7 and F8 are the start and end dates of the quarter but of course this just gives me all the trainings in the quarter, irregardless of if they've occurred before today's date. How can I add that criteria in?

    Thank you very much for your help! It's very much appreciated.

  2. #2
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: COUNTIF between two dates and also before today's date

    See the Excel Help on the COUNTIFS function (Excel 2007+ only).
    You can use multiple criteria of nearly any type, not just dates.
    Palmetto

    Do you know . . . ?

    You can leave feedback and add to the reputation of all who contributed a helpful response to your solution by clicking the star icon located at the left in one of their post in this thread.

  3. #3
    Registered User
    Join Date
    02-16-2012
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: COUNTIF between two dates and also before today's date

    Hey thanks for the tip... I figured it out... such a simple answer. All I had to do was add the extra criteria in:

    =COUNTIFS(Table1[Training Date],">="&F7, Table1[Training Date],"<="&F8, Table1[Training Date], "<="&$C$2)

    Where F7 is the Quarter Start Date, F8 is the Quarter End Date and C2 is today's date

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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