+ Reply to Thread
Results 1 to 2 of 2

Explain Countif function

  1. #1
    Registered User
    Join Date
    06-21-2012
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    1

    Explain Countif function

    Quote Originally Posted by DonkeyOte View Post
    Given you have XL2007 you can use COUNTIFS as opposed to SUMPRODUCT

    =COUNTIFS($C$1:$C$12,$C1,$B$1:$B$12,">"&$B1)+1

    However, though more efficient it is not (unlike SUMPRODUCT) backwards compatible with earlier versions of XL.



    Can you please explain to me the logic around how you built up the Countif function? Thanks!

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

    Re: using RANK and IF together

    COUNTIFS(criteriarange1,criteria1,criteriarange2,criteria2,....)

    So we check two ranges against 2 respective criteria, and counts number of times both criteria are true in same rows.

    First criteria checks number of times there is a match to C1 in all of C1:C12, the second checks if there any value in B1:B12 is greater than value in B1... after the count is made, we add 1 so that smallest rank (or largest value) value for each column A will be 1.

    As you copy formula down, C1 and B1 becomew C2 and B2 and those checks are made again...
    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.

+ 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