+ Reply to Thread
Results 1 to 6 of 6

Using COUNTIFS between dates when one more condition - can they be in one formula or not?

  1. #1
    Registered User
    Join Date
    11-27-2012
    Location
    helsinki
    MS-Off Ver
    Excel 2010
    Posts
    23

    Question Using COUNTIFS between dates when one more condition - can they be in one formula or not?

    Hi!

    If I have a the following formula to count the cell A1 only if it has a date which is equal or higher than the date in cell B1, and equal or lower to the date in cell, as follows:

    COUNTIFS(A1;">="&B1;A1;"<="&B2)

    Now I would only want to count as per this condition if the cell A2 has a value "Z".

    Can you do this by using one COUNTIFS formula alone? If I use COUNTIFS()+COUNTIFS() the result would be 2: one count for the value Z and one for the date, although the aim is to have one count when both the date meets the condition and the value is Z.

    It seems you canīt for example do this

    COUNTIFS(A2;"Z";A1;">="&B1;A1;"<="&B2) or
    COUNTIFS(A2;"Z");COUNTIFS(A1;">="&B1;A1;"<="&B2) or
    COUNTIFS(A2;"Z")(COUNTIFS(A1;">="&B1;A1;"<="&B2))

    For this one I would really want to avoid using a helper column.

    Many thanks for any ideas!
    Last edited by RogerRangeRover; 12-04-2012 at 06:24 AM.

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Using COUNTIFS between dates when one more condition - can they be in one formula or n

    Hi Roger,

    Please upload a sample workbook with sample scenario.. thanks.


    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), [email protected]

  3. #3
    Registered User
    Join Date
    11-27-2012
    Location
    helsinki
    MS-Off Ver
    Excel 2010
    Posts
    23

    Re: Using COUNTIFS between dates when one more condition - can they be in one formula or n

    Quote Originally Posted by dilipandey View Post
    Hi Roger,

    Please upload a sample workbook with sample scenario.. thanks.


    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    Please see attached a sample scenario. Where I have the problem is to use the COUNTIFS between dates plus one conditions from another Sheet.
    Attached Files Attached Files
    Last edited by RogerRangeRover; 12-04-2012 at 12:28 PM.

  4. #4
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: Using COUNTIFS between dates when one more condition - can they be in one formula or n

    Hi RogerRangeRover

    This worked!

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    And this works:

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by Kevin UK; 12-04-2012 at 12:53 PM.

  5. #5
    Registered User
    Join Date
    11-27-2012
    Location
    helsinki
    MS-Off Ver
    Excel 2010
    Posts
    23

    Re: Using COUNTIFS between dates when one more condition - can they be in one formula or n

    Hi Kevin,

    Thanks alot for these formulas! Much appreciated. What is the difference between a ";" and a "," in a COUNTIFS formula when you separate criterias and ranges? Sorry for the silly question! It seems like it is the key to use a comma instead of ; in this case?
    Thanks again
    Roger

  6. #6
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: Using COUNTIFS between dates when one more condition - can they be in one formula or n

    Hi Roger

    I think it is a regional setting. In the UK we use "," .

    Kevin

+ 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