+ Reply to Thread
Results 1 to 4 of 4

COUNTIFS Issue w/multiple date conditions

  1. #1
    Registered User
    Join Date
    05-26-2016
    Location
    Yakima
    MS-Off Ver
    365
    Posts
    5

    Question COUNTIFS Issue w/multiple date conditions

    I am attempting to: Count all unique text values in the range: B2:B21 that fall between 2 dates specified in the range A2:A21. Using the following:

    =COUNTIFS(DATA!B2:B21,"<>"&" ",DATA!A2:A21,">=1/1/2016", DATA!A2:A21,"<=12/31/2016")

    I'm able to get the total count, but haven't sucessfully been able to get a unique count to function.

    This has got me hung up slightly.

    Any help would be largely appreciated.

    Thanks in Advance.

    J
    Attached Files Attached Files

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

    Re: COUNTIFS Issue w/multiple date conditions

    Try this...

    Data Range
    A
    B
    1
    Year
    Count
    2
    2015
    10
    3
    2016
    6
    4
    ------
    ------


    This array formula** entered in B2 and copied down:

    =SUM(IF(FREQUENCY(IF(YEAR(DATA!A$2:A$21)=A2,MATCH(DATA!B$2:B$21,DATA!B$2:B$21,0)),ROW(DATA!B$2:B$21)-ROW(DATA!B$2)+1),1))

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Registered User
    Join Date
    05-26-2016
    Location
    Yakima
    MS-Off Ver
    365
    Posts
    5

    Re: COUNTIFS Issue w/multiple date conditions

    This works in this case and most case I will be using this in, but what about if I need to pull a date range within a givien year? Ie. Quarterly Reporting? In this situation the YEAR() function seems far too limiting. What would you recommend?

    J

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

    Re: COUNTIFS Issue w/multiple date conditions

    In that case use 2 cells to hold the date range. For example:

    A2 = start date
    B2 = end date

    Then, the formula would be:

    =SUM(IF(FREQUENCY(IF(DATA!A$2:A$21>=A2,IF(DATA!A$2:A$21<=B2,MATCH(DATA!B$2:B$21,DATA!B$2:B$21,0))),ROW(DATA!B$2:B$21)-ROW(DATA!B$2)+1),1))

    Still array entered.

+ 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. CountIfs With Multiple Conditions
    By 5150 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-13-2015, 11:16 AM
  2. COUNTIFS multiple conditions
    By akkerstad in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 11-04-2014, 03:38 PM
  3. Countifs over multiple worksheets issue
    By luciedefreitas in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-28-2014, 09:10 AM
  4. Adding multiple COUNTIFS issue
    By purdue7997 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-17-2013, 06:40 AM
  5. CountIfs By Month - Multiple Date and Text Conditions
    By MAC0605 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-08-2013, 06:22 PM
  6. [SOLVED] CountIfs With Multiple Conditions
    By NotQuiteThere in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 12-18-2012, 09:35 PM
  7. Countifs for multiple conditions
    By batjl9 in forum Excel General
    Replies: 4
    Last Post: 03-25-2011, 09:07 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