+ Reply to Thread
Results 1 to 7 of 7

Counting cells based on values of adjacent cells

  1. #1
    Registered User
    Join Date
    10-26-2013
    Location
    Greater Boston, Massachusetts
    MS-Off Ver
    Excel 2011 (Mac)
    Posts
    3

    Counting cells based on values of adjacent cells

    Hi everyone,

    I have a simple file listing a student's name (text field), his average across a series of exam (percentage field), and his score on a state test (number field). I want to figure out:

    1) how many students scored above a certain number on the state test that also averaged above a certain percentage on the exams;

    2) how many students scored above a certain number on the state test that also averaged below a certain percentage on the exams.

    Example:

    John 86% 240
    Sally 40% 234
    Jim 60% 241

    If I wanted to know how many students scored above 240 and also averaged above 80%, it should return 1.

    If I wanted to know how many students scored above 240 and also averaged below 80%, it should return 1.

    Thank you so much for your help!

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Counting cells based on values of adjacent cells

    well none of those criteria are met as no student has ABOVE 240 and GREATER than 80%
    do you mean Above or = to?
    =COUNTIFS(B1:B10,">=0.8",C1:C10,">=240")
    and
    =COUNTIFS(B1:B10,"<0.8",C1:C10,">=240")
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    10-26-2013
    Location
    Greater Boston, Massachusetts
    MS-Off Ver
    Excel 2011 (Mac)
    Posts
    3

    Re: Counting cells based on values of adjacent cells

    Woops! Yes, I meant greater than or equal to.

    Thank you! That worked quite like a charm.

    EDITED TO ASK:

    What if I wanted to specify the criteria further? For example:

    All students who scored greater than 70% but less than 80% on the exams AND got a 240 or higher on the state test?
    Last edited by SpookyAlienX; 10-26-2013 at 02:16 PM.

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Counting cells based on values of adjacent cells

    id go back to sum product for that
    =SUMPRODUCT(--(B1:B10>0.7),--(B1:B10<0.8),--(C1:C10>=240))

  5. #5
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Counting cells based on values of adjacent cells

    If you wanted to stick with the COUNTIFS the "between" criteria would be:

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  6. #6
    Registered User
    Join Date
    10-26-2013
    Location
    Greater Boston, Massachusetts
    MS-Off Ver
    Excel 2011 (Mac)
    Posts
    3

    Re: Counting cells based on values of adjacent cells

    Thank you both so much! This is perfect.

  7. #7
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Counting cells based on values of adjacent cells

    We're glad that you found a suitable solution to your problem. Thanks for the feedback.

+ 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. [SOLVED] Counting Specific Text Occurences in Cells Adjacent to Particular Values
    By lowlybroker in forum Excel General
    Replies: 7
    Last Post: 10-21-2013, 12:07 PM
  2. Replies: 1
    Last Post: 07-24-2012, 02:06 PM
  3. Merge Cells based on an adjacent row of values
    By Metal Head in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-04-2011, 09:55 AM
  4. Counting cells with a criteria based on content and adjacent cell
    By ziggy12345 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-03-2008, 03:32 PM
  5. Format cell based on adjacent cells values
    By the majestic ferny in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-16-2005, 02:35 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