+ Reply to Thread
Results 1 to 4 of 4

Number of values above x in column B, for each unique value in adjacent column A.

  1. #1
    Registered User
    Join Date
    02-12-2012
    Location
    Oslo, Norway
    MS-Off Ver
    Excel 2007, 2013
    Posts
    89

    Number of values above x in column B, for each unique value in adjacent column A.

    A -- B
    YY - 2
    YY - 23
    YY - 5
    Y -- 6
    Y -- 23
    Y -- 3
    Y -- 5

    I need to find the number of values in column B that are above 20, for each unique value in column A. So for Y, there is one value above 20. For YY, there is one value above 20. And so on. How do I return this?
    Last edited by Test123Test; 03-17-2012 at 11:33 PM.

  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: Number of values above x in column B, for each unique value in adjacent column A.

    You should be using COUNTIFS() for this.... (not CountIf, COUNTIFS).

    =COUNTIFS(A:A, "Y", B:B, ">20")

    ....etc.
    _________________
    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
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Number of values above x in column B, for each unique value in adjacent column A.

    Helper column

    using your example
    in C1
    =COUNTIF($B$2:$B$7,">20")

    Then maybe use Autofilter or a Pivot Table
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  4. #4
    Registered User
    Join Date
    02-12-2012
    Location
    Oslo, Norway
    MS-Off Ver
    Excel 2007, 2013
    Posts
    89

    Re: Number of values above x in column B, for each unique value in adjacent column A.

    Quote Originally Posted by JBeaucaire View Post
    You should be using COUNTIFS() for this.... (not CountIf, COUNTIFS).

    =COUNTIFS(A:A, "Y", B:B, ">20")

    ....etc.
    Ah, beautiful. Thanks for this! Repped and marked as solved

+ 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