+ Reply to Thread
Results 1 to 13 of 13

Countif with multiple parameters for the same range?

  1. #1
    Registered User
    Join Date
    02-23-2014
    Location
    Norway
    MS-Off Ver
    Excel 2010
    Posts
    49

    Countif with multiple parameters for the same range?

    Hello,

    I was wondering if I can somehow use multiple parameters for the same range with "COUNTIF"? I know we have countifs function for multiple parameters but I am just lazy to fill out same range for every parameter since I have many parameters. Tried to use array but looks like didn't work. I think I saw somwhere that you can indicate several parameters using COUNTIF with dates by "/" symbol. Is there anything like that for regular text (not dates)?
    Thank you

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Countif with multiple parameters for the same range?

    We can only help if we know what your criteria are.
    Can you post some sample data, the COUNTIF rules you want to implement, and the resulting count (based on the sample data)?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: Countif with multiple parameters for the same range?

    It depends on what your criteria is like, for instance if its text then it may be covered by a Regular expression, can you post some examples?
    If someone has helped you then please add to their Reputation

  4. #4
    Registered User
    Join Date
    02-23-2014
    Location
    Norway
    MS-Off Ver
    Excel 2010
    Posts
    49

    Re: Countif with multiple parameters for the same range?

    Exampleforforum2.xlsx

    thanks for replies. I am attaching a spreadsheet. I need to count # of instances my parameters are met in the range. Thank you

  5. #5
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,829

    Re: Countif with multiple parameters for the same range?

    Put this in D2:

    =COUNTIF(B:B,C2)

    then copy down. Note that you have a lot more distinct entries than in your list in column C.

    Hope this helps.

    Pete

  6. #6
    Registered User
    Join Date
    02-23-2014
    Location
    Norway
    MS-Off Ver
    Excel 2010
    Posts
    49

    Re: Countif with multiple parameters for the same range?

    Pete, thanks a lot, however it has to be 1 cell formula. So my question was is there any way I can avoid using COUNTIFS specifying range every time for a new parameter and some how use all these parameters in COUNTIF formula specifying range only once? Tried to use array - didn't work.
    Thanks

  7. #7
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,829

    Re: Countif with multiple parameters for the same range?

    Ah, right - put this array* formula in D2:

    =SUM(COUNTIF(B:B,C2:C14))

    *An array formula needs to be confirmed using Ctrl-Shift-Enter (CSE), rather than the usual <Enter>.

    Hope this helps.

    Pete

  8. #8
    Registered User
    Join Date
    02-23-2014
    Location
    Norway
    MS-Off Ver
    Excel 2010
    Posts
    49

    Re: Countif with multiple parameters for the same range?

    Thanks a lot, Pete, exactly what I need!

  9. #9
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Countif with multiple parameters for the same range?

    Try this regular formula:
    Please Login or Register  to view this content.
    Does that help?

  10. #10
    Registered User
    Join Date
    02-23-2014
    Location
    Norway
    MS-Off Ver
    Excel 2010
    Posts
    49

    Re: Countif with multiple parameters for the same range?

    it does, thanks, Ron!

  11. #11
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Countif with multiple parameters for the same range?

    Quote Originally Posted by Ron Coderre View Post
    Try this regular formula:
    Please Login or Register  to view this content.
    Does that help?
    That won't work without CSE!

    SUMPRODUCT would avoid array-entry, though.

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  12. #12
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,829

    Re: Countif with multiple parameters for the same range?

    Thanks for the rep, Royser.

    Pete

  13. #13
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Countif with multiple parameters for the same range?

    Oops! That's what I meant to post.

+ 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. Sumif a range based on multiple parameters
    By ifthenelsenull in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-14-2014, 05:21 AM
  2. Date Range: Array Formula with multiple parameters.
    By niceguy21 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 10-10-2012, 06:04 AM
  3. Excel 2007 : COUNTIF with multiple parameters
    By adleveritt in forum Excel General
    Replies: 3
    Last Post: 03-08-2012, 02:08 PM
  4. CountIF multiple parameters
    By Karroog in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 06-18-2009, 11:35 AM
  5. Multiple Range and Multiple Criteria in a COUNTIF
    By KADean in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-11-2007, 05:26 PM
  6. COUNTIF multiple range / multiple criteria
    By fantom013 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-24-2007, 04:28 PM
  7. countif - I want to enter 2 parameters - how?
    By NancyP192 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-02-2006, 01:45 PM

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