+ Reply to Thread
Results 1 to 8 of 8

CountIFS with and operator or SUMPRODUCT?

  1. #1
    Registered User
    Join Date
    01-22-2016
    Location
    Bangalore
    MS-Off Ver
    2013
    Posts
    3

    CountIFS with and operator or SUMPRODUCT?

    I am trying to do an AND between 2 conditions which work with a count.I want a result of something as pasted below

    (COUNTIFS(F33:F83,"<12/14/2015",F33:F83,">12/11/2015") and (COUNTIFS(G3:G53,"\Release 2\Sprint 2")))

    So the first count is anything between the 2 dates and the next is the count of anything which matches "\Release 2\Sprint 2"

    I tried SUMPRODUCT but not able to get it right.
    =SUMPRODUCT(--(F33:F83="<12/14/2015",F33:F83=">12/11/2015"),--(G3:G53="\Release 2\Sprint 2")))

    And I definitely know that this is not doing an AND operation but I tried nevertheless
    =SUM(COUNTIFS(F33:F83,"<12/28/2015",F33:F83,">12/25/2015")+(COUNTIFS(G3:G53,"\Release 2\Sprint 3")))


    Help would be really appreciated

  2. #2
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,935

    Re: CountIFS with and operator or SUMPRODUCT?

    Perhaps try

    =SUMPRODUCT(--(F33:F83<=12/14/2015),--(F33:F83>=12/11/2015),--(G3:G53="\Release 2\Sprint 2"))
    If I helped, Don't forget to add reputation (click on the little star ★ at bottom of this post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)

  3. #3
    Forum Contributor
    Join Date
    06-30-2015
    Location
    Netherlands
    MS-Off Ver
    2013 / 2016 / 365
    Posts
    145

    Re: CountIFS with and operator or SUMPRODUCT?

    Hi,

    Excel can't handle "and/or" in different ranges within COUNTIFS or SUMPRODUCT.
    So to get to the right answer your data must be aligned over the same row numbers.
    Either by shifting G3:G53 down so it aligns with F33:F83 or the other way around.

    Hope this helps.

  4. #4
    Registered User
    Join Date
    01-22-2016
    Location
    Bangalore
    MS-Off Ver
    2013
    Posts
    3

    Re: CountIFS with and operator or SUMPRODUCT?

    Quote Originally Posted by joris moerings View Post
    So to get to the right answer your data must be aligned over the same row numbers.
    Either by shifting G3:G53 down so it aligns with F33:F83 or the other way around.
    I didn't understand this part, Joris.

    Ankur, That didn't work.

  5. #5
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,935

    Re: CountIFS with and operator or SUMPRODUCT?

    It will be better if you can upload a sample spreadsheet with desired result.

    Go to advance and click on attachment link and attach the workbook

    Thanks
    Ankur

  6. #6
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,911

    Re: CountIFS with and operator or SUMPRODUCT?

    Post sample excel file with expected result
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  7. #7
    Registered User
    Join Date
    01-22-2016
    Location
    Bangalore
    MS-Off Ver
    2013
    Posts
    3

    Re: CountIFS with and operator or SUMPRODUCT?

    1. I want a count of dates which fall between 12/14/2015 and 12/11/2015 in Created Date column.
    2. I want a count of items matching the string "\Release 2\Sprint 2" in Iteration Path.
    Want to 'AND' both of above
    Attached Images Attached Images
    Attached Files Attached Files

  8. #8
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,935

    Re: CountIFS with and operator or SUMPRODUCT?

    Try

    =SUMPRODUCT(($A$2:$A$82>=DATE(2015,12,11))*($A$2:$A$82<=DATE(2015,14,11))*(B2:B82="\Release 2\Sprint 2"))

+ 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 and SUMPRODUCT need help
    By rschoenb in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-12-2014, 11:21 PM
  2. [SOLVED] Sumproduct/countifs
    By mahat in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 07-21-2014, 10:30 PM
  3. How to convert countifs to sumproduct
    By Dzana in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 11-25-2013, 12:37 PM
  4. COUNTIFS and SUMPRODUCT help
    By Stacy1 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 07-19-2013, 02:35 PM
  5. [SOLVED] Sumproduct as Countifs issue
    By jake.masters in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-12-2012, 10:49 AM
  6. Using SUMPRODUCT instead of COUNTIFS
    By SymphonyTomorrow in forum Excel General
    Replies: 12
    Last Post: 11-18-2011, 05:01 PM
  7. SUMPRODUCT and OR operator
    By Madiya in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-10-2006, 10:34 AM

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