+ Reply to Thread
Results 1 to 9 of 9

Using Countifs with multiple "Trues"

  1. #1
    Forum Contributor
    Join Date
    09-22-2009
    Location
    Henderson, KY
    MS-Off Ver
    Excel 2007
    Posts
    152

    Using Countifs with multiple "Trues"

    Here is the formula I am using now:

    =COUNTIFS(Table8[Column1],"="&B$2,Table8[Value for Chart],A$2)+COUNTIFS(Table1[Column1],"="&B$2,Table1[Value for Chart],A$2)

    I would like to search for 6 items, instead of what is in A$2. I have these in a named range called "Stamping". What would be a good way to do this?

    I tried OR(Stamping)

    and OR($B$40:$B$46) which is where 'Stamping' is.
    Last edited by Befuddled; 01-26-2010 at 04:20 AM.

  2. #2
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,342

    Re: Using Countifs with multiple "Trues"

    Hi Befuddled

    try..
    =COUNTIFS(Table8[Column1],B$2,Table8[Value for Chart],A$2,Table1[Column1],B$2,Table1[Value for Chart],A$2)
    Last edited by pike; 01-26-2010 at 04:07 AM.
    If the solution helped please donate to RSPCA

    Site worth visiting: Rabbitohs

  3. #3
    Forum Contributor
    Join Date
    09-22-2009
    Location
    Henderson, KY
    MS-Off Ver
    Excel 2007
    Posts
    152

    Re: Using Countifs with multiple "Trues"

    The problem area for me is in the A$2, not with the "="& part, I want the formula to look for 6 items, and count every time any of them pop up.

    I would like to search for 6 items, instead of what is in A$2. I have these in a named range called "Stamping". What would be a good way to do this?

    I tried OR(Stamping)

    and OR($B$40:$B$46) which is where 'Stamping' is.

  4. #4
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,342

    Re: Using Countifs with multiple "Trues"

    do you have a sample to play with?
    try this if its not B2
    =COUNTIFS(Table8[Column1],"<>"B$2,Table8[Value for Chart],A$2)+COUNTIFS(Table1[Column1],"="&B$2,Table1[Value for Chart],A$2)
    Last edited by pike; 01-26-2010 at 04:08 AM.

  5. #5
    Forum Contributor
    Join Date
    09-22-2009
    Location
    Henderson, KY
    MS-Off Ver
    Excel 2007
    Posts
    152

    Re: Using Countifs with multiple "Trues"

    Sorry, I must not have explained it very well. I am trying to change a different part of the original formula:

    =COUNTIFS(Table8[Column1],"="&B$2,Table8[Value for Chart],A$2)+COUNTIFS(Table1[Column1],"="&B$2,Table1[Value for Chart],A$2)

    I am trying to put something in the place of each of the "A$2"'s that makes it search for multiple things, like the words: Bob, Dave, Joe, and Matt. nothing I have tried has worked.

  6. #6
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Using Countifs with multiple "Trues"

    I think you will be best served reverting to a SUMPRODUCT - more expensive but more succinct.

    So, if I've understood, perhaps:

    Please Login or Register  to view this content.
    Last edited by DonkeyOte; 01-26-2010 at 04:10 AM. Reason: superfluous = operator !

  7. #7
    Forum Contributor
    Join Date
    09-22-2009
    Location
    Henderson, KY
    MS-Off Ver
    Excel 2007
    Posts
    152

    Re: Using Countifs with multiple "Trues"

    I will try that. While I am asking questions... Where I have "Table1" is there any way to make that "Table"&$A$6 ? so that I can have the formula look int different Tables depending on what is in $A$6 ?

  8. #8
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Using Countifs with multiple "Trues"

    You would have to use INDIRECT at which point you're making the SUMPRODUCTs Volatile which IMO is a very bad idea I'm afraid...

    You can certainly try it and test for performance impact but generally speaking Volatile Arrays are best avoided.

    As an indication of syntax required:

    Please Login or Register  to view this content.
    so you must INDIRECT to create each range referenced

  9. #9
    Forum Contributor
    Join Date
    09-22-2009
    Location
    Henderson, KY
    MS-Off Ver
    Excel 2007
    Posts
    152

    Re: Using Countifs with multiple "Trues"

    That formula works great. Thank you

+ 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