+ Reply to Thread
Results 1 to 4 of 4

Counting with ranges

  1. #1
    Registered User
    Join Date
    02-16-2008
    Posts
    48

    Counting with ranges

    Hello everyone,

    I am trying to calculate the number of entries within certain criteria.

    For example:
    Column A Column B
    1.771277978 1.49972
    5.832262498 1.0647
    6.350262937 1.88901
    6.940459075 3.14165
    6.596007294 1.99719
    4.288934835 3.0043
    0.224337565 -0.29771
    2.978691222 1.636476
    5.870144774 1.83775
    2.28300368 -2.24976
    3.550696473 0.400509
    3.498860598 1.30073

    The list of number (it's trunkated) i need to calculated the number of points were A>5 and b not negative, also 5>A>4 and B is not negative, and so on.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: sumproduct?

    If you have XL2007 or later:

    =COUNTIFS(A1:A100,">5",B1:B100,">=0")

    and

    =COUNTIFS(A1:A100,">4",A1:A100,"<5",B1:B100,">=0")

    if using XL2003 or earlier

    =SUMPRODUCT(--(A1:A100>5),--(B1:B100>=0))

    and

    =SUMPRODUCT(--(A1:A100>4),--(A1:A100<5),--(B1:B100>=0))

    continue those patterns.

    Note: What about equals 5... add = where appropriate.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    02-16-2008
    Posts
    48

    Re: sumproduct?

    Thanks it worked!!!!

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: sumproduct?

    Please update your profile to indicate your Office version and mark thread as solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

+ 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