+ Reply to Thread
Results 1 to 8 of 8

Countifs results in 0 with Date range

  1. #1
    Registered User
    Join Date
    11-07-2013
    Location
    Canada
    MS-Off Ver
    Office 365
    Posts
    14

    Countifs results in 0 with Date range

    I need some help with my formula. The data ranges in the formula is blocking the outcome. If the second and third criteria are removed then the formula works, but gives me a count for the year. A2 and B2 are the dates with in the sheet. Any help would be nice.

    I've tried using Sumproduct as well with the same results. I've tried using dates with in the formula to no avail.

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.

  2. #2
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Countifs results in 0 with Date range

    Without seeing an example, it's hard to offer much criticism for a formula that appears to look fine.

    Is your date ranges in text format? Are A2 and B2 correctly formatted? Have you considered limiting your ranges to speed up performance?
    Make Mom proud: Add to my reputation if I helped out!

    Make the Moderators happy: Mark the Thread as Solved if your question was answered!

  3. #3
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Countifs results in 0 with Date range

    For the countifs, the syntax to do >=CellRef is
    ">="&A2

    Try
    =COUNTIFS('Sheet1'!G:G, "Keyword", 'Sheet1'!F:F,"<="&A2, 'Sheet1'!F:F, ">="&B2)

  4. #4
    Registered User
    Join Date
    11-07-2013
    Location
    Canada
    MS-Off Ver
    Office 365
    Posts
    14

    Re: Countifs results in 0 with Date range

    Dates are 2013-11-7 format displaying in long form. I tried doing a few tests with limited data and came up with the same results. I've added a URL to my test file if you want to take a look. I thought that I was missing something in my formula.


    https://dl.dropboxusercontent.com/u/18658364/Book1.xlsx

  5. #5
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Countifs results in 0 with Date range

    Jonmo caught it! The operators need separated from the criteria.

  6. #6
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Countifs results in 0 with Date range

    Some of your dates are not really dates, they're just text strings.

    The dates in D3 D5 E3 and F14 are all real dates.
    The rest are just text strings.

    Correct the dates in E5 and F15 through F18


    And use the formula like this in G3
    =COUNTIFS($G$14:$G$18,"Expenses",$F$14:$F$18,"<="&E3, $F$14:$F$18, ">="&D3)

  7. #7
    Registered User
    Join Date
    11-07-2013
    Location
    Canada
    MS-Off Ver
    Office 365
    Posts
    14

    Re: Countifs results in 0 with Date range

    So the dates were the issue, and the sumproduct works as well.

    Thanks everyone!

  8. #8
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Countifs results in 0 with Date range

    You're welcome.

+ 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 With Date Range
    By OlYeller21 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 12-03-2013, 08:32 AM
  2. [SOLVED] COUNTIFS with Date Range
    By whizbee in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 10-28-2013, 03:44 PM
  3. Using countifs with date range, and summing values in that range
    By bmcoonan in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-30-2013, 11:28 AM
  4. [SOLVED] COUNTIFS Date Range problem
    By dtrimble in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 12-02-2012, 01:32 PM
  5. date range and COUNTIFS
    By momus12 in forum Excel General
    Replies: 8
    Last Post: 12-28-2008, 05:38 PM

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