+ Reply to Thread
Results 1 to 5 of 5

Counting numbers in one column by criteria in another

  1. #1
    Registered User
    Join Date
    04-13-2005
    Location
    Cleveland, USA
    Posts
    33

    Counting numbers in one column by criteria in another

    I have the following data:
    Unit Criteria
    4b 4
    6b 1
    4b 1
    6b 2
    4a 1
    4b 1
    6b 3
    6b 1
    4a 1
    6b 5
    I need to know how many times 4b (and 4a and 6b) has each of five criteria (1,2,3,4 or 5). I was looking at SUMPRODUCT that I have used to count criteria that are text, but it doesn't work for numeric criteria.
    Can anyone help?
    Thanks.
    Mike
    Mike

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Counting numbers in one column by criteria in another

    Maybe this:
    =SUMPRODUCT(--($A1:$A20="4a"),--($B$1:$B$20<=5))
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: Counting numbers in one column by criteria in another

    See attached.

  4. #4
    Registered User
    Join Date
    04-13-2005
    Location
    Cleveland, USA
    Posts
    33

    Re: Counting numbers in one column by criteria in another

    Thanks very much Palmetto! I didn't think of setting up a results table with criteria, or whatever that is officially called.

  5. #5
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: Counting numbers in one column by criteria in another

    You're welcome.

    If you're satisfied with the solution please mark the thread as solved and be sure to add to the reputation of all who helped by clicking the scale icon in a post from those who responsed.

+ 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