+ Reply to Thread
Results 1 to 9 of 9

Countifs - Dates greater than.

  1. #1
    Forum Contributor
    Join Date
    10-15-2013
    Location
    Calgary, Alberta
    MS-Off Ver
    Excel 2007
    Posts
    218

    Countifs - Dates greater than.

    Hello all,

    Not sure why this is not working. I have dates in column A and column B. I would like to countifs (there are other criteria's that i won't get into) all the dates that are greater then 2 days apart.

    For example:

    Column A Column B
    15-Jan 16-Jan
    15-Jan 18-Jan
    16-Jan 16-Jan
    16-Jan 25-Jan
    17-Jan 10-Feb
    17-Jan 18-Jan

    =COUNTIFS(A$2:A$10,">"&B$2:B$10+2)

    but i'm getting the value of 6 when i should get the value of 3.

    What am i missing?

    Thanks!

  2. #2
    Registered User
    Join Date
    07-15-2015
    Location
    South East England
    MS-Off Ver
    2010 & 2013
    Posts
    72

    Re: Countifs - Dates greater than.

    Why not add a column to the data and put;

    =IF(B2-A2>2,">2 Days","<2 Days")

    Then change your COUNTIFS Criteria to look for the outcome of said formula

  3. #3
    Forum Contributor
    Join Date
    10-15-2013
    Location
    Calgary, Alberta
    MS-Off Ver
    Excel 2007
    Posts
    218

    Re: Countifs - Dates greater than.

    Quote Originally Posted by Joe Bushfield View Post
    Why not add a column to the data and put;

    =IF(B2-A2>2,">2 Days","<2 Days")

    Then change your COUNTIFS Criteria to look for the outcome of said formula
    Hi Joe, actually i used to have "helper columns" but it's a metric that i don't need and i'm trying to consolidate my data to fewer columns. If this is not achievable then i would not press it and leave the extra column but i'm just not sure what is wrong with my current formula.

  4. #4
    Forum Expert
    Join Date
    02-22-2013
    Location
    London, UK
    MS-Off Ver
    Office 365
    Posts
    1,218

    Re: Countifs - Dates greater than.

    Try,

    =SUMPRODUCT(--(($B$2:$B$10-$A$2:$A$10)>2))

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

    Re: Countifs - Dates greater than.

    You can't use COUNTIFS for that. You can use SUMPRODUCT:

    =SUMPRODUCT(--(B2:B10-A2:A10>2))
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  6. #6
    Valued Forum Contributor
    Join Date
    02-07-2013
    Location
    Philippines
    MS-Off Ver
    Excel Online; 365
    Posts
    610

    Re: Countifs - Dates greater than.

    Hi JasonNeedsHelp,

    Try if this formula works for you:

    =COUNTIFS(B1:B6,">"&A1+2)

    ignore..copy pasted the wrong formula
    Last edited by bhenlee; 07-15-2015 at 12:20 PM.
    If I've helped U pls click on d *Add Reputation

  7. #7
    Valued Forum Contributor mahju's Avatar
    Join Date
    11-27-2010
    Location
    Pakistan, Faisalabad
    MS-Off Ver
    Excel 2010 plus
    Posts
    730

    Re: Countifs - Dates greater than.

    Try this array formula (Ctrl + shift + enter)

    Please Login or Register  to view this content.
    Regards
    Mark the thread as solved if you are satisfied with the answer.


    In your first post under the thread tools.

    Mahju

  8. #8
    Forum Contributor
    Join Date
    10-15-2013
    Location
    Calgary, Alberta
    MS-Off Ver
    Excel 2007
    Posts
    218

    Re: Countifs - Dates greater than.

    Thanks all, because of all the other varibles that i need to countifs i think i'll just stick with the helper column. Thanks all for the help!

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

    Re: Countifs - Dates greater than.

    You're welcome. 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. [SOLVED] COUNTIFS between 2 dates - how to calculate for blank dates
    By HeyInKy in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-13-2014, 12:03 AM
  2. Problems using Countifs and "greater than" with formula values
    By ellywooo in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-26-2014, 01:54 PM
  3. [SOLVED] COUNTIFS function w/greater than or equal to, and less than or equal to time values
    By AliciaRenee in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-27-2014, 03:57 PM
  4. [SOLVED] Using greater than or less than today as a criteria in a countifs
    By santanicopandimonium in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-05-2014, 02:48 AM
  5. Countifs and dates
    By Cullymore in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-04-2013, 10:13 PM
  6. Help With COUNTIFS Using Greater Than Criteria
    By amerain in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 06-04-2013, 11:31 AM
  7. Replies: 3
    Last Post: 07-19-2010, 01:02 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