+ Reply to Thread
Results 1 to 4 of 4

CountIF for dynamic length column using criteria of Named Range

  1. #1
    Registered User
    Join Date
    03-04-2013
    Location
    Tulsa, OK
    MS-Off Ver
    Excel 2007
    Posts
    3

    CountIF for dynamic length column using criteria of Named Range

    I have a worksheet with a dynamic length column that contains text data, imported from another application, such as:
    "Entrants"
    pie
    chicken
    cow
    cow
    pie
    duck

    I have a Named Range containing a list of Exclusions, also in text data.
    Named Range would be something like:
    "Exclusions"
    chicken
    cow
    duck

    I need to count how many times the items within the Exclusions named range occur within the worksheet with the dynamic length column.
    (I don't need a breakout for the individual items on the Exclusions named range.)

    But when I attempt the following formula it seems to evaluate the first cell only then stop.
    Please Login or Register  to view this content.
    If I replace "Exclusions" in the formula with one of the entries of the Exclusions named range, then the formula works.

    But how would I get it working with a named range?
    Last edited by saber0091; 03-04-2013 at 02:04 PM. Reason: solved

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: CountIF for dynamic length column using criteria of Named Range

    Using an arrayed formula (CNTRL SHFT ENTER instead of ENTER)

    =SUM(COUNTIF(Entrants,Exclusions))
    Does that work for you? Returned 4 for me.
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Valued Forum Contributor Harribone's Avatar
    Join Date
    02-24-2013
    Location
    Midlands, UK
    MS-Off Ver
    Excel 2019/365
    Posts
    570

    Re: CountIF for dynamic length column using criteria of Named Range

    Assuming that the Exclusions list is in column A, you can count each item individually in column B:

    Please Login or Register  to view this content.
    Then you can sum the total of this. I personally don't know a way of using multiple criteria (i did think =COUNTIFS(Entrants!A:A,OR(A1,A2,A3)) would work but it doesn't) so the method above will do the job until you get more accurate solution.
    Say thanks, click *

  4. #4
    Registered User
    Join Date
    03-04-2013
    Location
    Tulsa, OK
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: CountIF for dynamic length column using criteria of Named Range

    Quote Originally Posted by ChemistB View Post
    Using an arrayed formula (CNTRL SHFT ENTER instead of ENTER)

    =SUM(COUNTIF(Entrants,Exclusions))
    Does that work for you? Returned 4 for me.

    This did it. Not sure why I didn't think of that. Thank you very much!

+ 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