+ Reply to Thread
Results 1 to 8 of 8

countIF 2 dates in table are equal

  1. #1
    Registered User
    Join Date
    02-22-2014
    Location
    London, England
    MS-Off Ver
    Excel 2016
    Posts
    20

    countIF 2 dates in table are equal

    Hello (Excel 2016)

    I have a table with 2 columns table[dateOpen] and table[dateClosed].
    I would like to count the number of times dateOpen and dateClosed are equal just referencing the column name.

    =COUNTIF(table[dateOpen],"="&table[dateClosed]) returns #VALUE!

  2. #2
    Forum Expert PaulM100's Avatar
    Join Date
    10-09-2017
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    2,108

    Re: countIF 2 dates in table are equal

    Try something like this:
    =SUMPRODUCT(COUNTIF(INDIRECT({"table[dateOpen]","table[dateClosed]"}),your date criteria))

    EDIT: Forget the above, use this one:
    =SUMPRODUCT(--(ISNUMBER(MATCH(table[dateOpen],table[dateClosed],0))))
    Click the * to say thanks.

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: countIF 2 dates in table are equal

    Try:

    =SUMPRODUCT(--(Table1[Open]=Table1[Closed]))
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  4. #4
    Registered User
    Join Date
    02-22-2014
    Location
    London, England
    MS-Off Ver
    Excel 2016
    Posts
    20

    Re: countIF 2 dates in table are equal

    Hi Glenn - this works perfectly.
    Thank you.

  5. #5
    Registered User
    Join Date
    02-22-2014
    Location
    London, England
    MS-Off Ver
    Excel 2016
    Posts
    20

    Re: countIF 2 dates in table are equal

    Hi Paul,
    Unfortunately I couldn't get this to work.
    Thanks.

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: countIF 2 dates in table are equal

    You're welcome.



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

    It'd also be appreciated if you were to click the Add Reputation button at the foot of any of the posts of all members who helped you reach a solution.

  7. #7
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: countIF 2 dates in table are equal

    Paul's solution works OK for me.
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  8. #8
    Registered User
    Join Date
    02-22-2014
    Location
    London, England
    MS-Off Ver
    Excel 2016
    Posts
    20

    Re: countIF 2 dates in table are equal

    Quote Originally Posted by PaulM100 View Post
    Try something like this:
    =SUMPRODUCT(COUNTIF(INDIRECT({"table[dateOpen]","table[dateClosed]"}),your date criteria))

    EDIT: Forget the above, use this one:
    =SUMPRODUCT(--(ISNUMBER(MATCH(table[dateOpen],table[dateClosed],0))))


    This works now too - cheers.

+ 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] Countif date on each table row is between specific dates
    By oriyuno in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-27-2019, 05:11 AM
  2. [SOLVED] Countif changes with equal count
    By Musiclover119 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 05-13-2017, 06:13 PM
  3. [SOLVED] Countif does not equal F4:F15
    By sick stigma in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-10-2015, 01:26 PM
  4. [SOLVED] Using COUNTIF with two criteria being equal
    By Spiritsoar in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-03-2013, 06:53 PM
  5. [SOLVED] Auto filling dates based on previously entered dates and averaging numbers if dates equal
    By grambograham in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-11-2012, 03:21 PM
  6. Countif with dates in pivot table..
    By excelkeechak in forum Excel General
    Replies: 2
    Last Post: 09-08-2011, 06:20 AM
  7. countif more than x but equal to or less than x
    By superspurs in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-31-2009, 05:16 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