+ Reply to Thread
Results 1 to 7 of 7

Comparing range and return top running numbers

  1. #1
    Registered User
    Join Date
    12-24-2012
    Location
    Malaysia
    MS-Off Ver
    Excel 2003
    Posts
    6

    Comparing range and return top running numbers

    Hi,

    I need a formula to compare a range of numbers and return which is 1st, 2nd, 3rd and so on.

    Assuming I got the first one right, if there were 10 rows, what do I need to add in the formula so that the rest can return with 2nd, 3rd, 4th, ....?
    =IF(MAX(A1:A10)>B1,"","1st")

    I attach a sample workbook.
    comparison.xlsx


    Thanks in advance!

  2. #2
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Comparing range and return top running numbers

    In your example, in C2 try:

    =INDEX({"1st","2nd","3rd","4th","5th","6th","7th","8th"},MATCH(B2,INDEX(LARGE($B$2:$B$8,ROW(INDIRECT("1:"&COUNT($B$2:$B$8)))),0),0))

    Not sure how you want it do deal with duplicate values, though.

  3. #3
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Comparing range and return top running numbers

    What is the expected output if 2 numbers are fall in same value?


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  4. #4
    Registered User
    Join Date
    12-24-2012
    Location
    Malaysia
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Comparing range and return top running numbers

    That's a good point. If duplicated value detected, then return "Tie with x" where x is the value between 1st and xx?

  5. #5
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Comparing range and return top running numbers

    In C2 cell
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Drag it down...

    Please don't laugh, I am not sure what do you mean by x and xx

  6. #6
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Comparing range and return top running numbers

    Like this, maybe?

    =IF(COUNTIF($B$2:$B$8,B4)>1,"Tie with ","") & INDEX({"1st","2nd","3rd","4th","5th","6th","7th","8th"},MATCH(B4,INDEX(LARGE($B$2:$B$8,ROW(INDIRECT("1:"&COUNT($B$2:$B$8)))),0),0))

  7. #7
    Registered User
    Join Date
    12-24-2012
    Location
    Malaysia
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Comparing range and return top running numbers

    Hi all,

    The outcome is still a little funny but it'll do for now
    Thanks to all for the brainstorm!

+ 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