+ Reply to Thread
Results 1 to 6 of 6

Returning ROW number from MIN value

  1. #1
    Registered User
    Join Date
    03-29-2011
    Location
    Hastings, Sussex
    MS-Off Ver
    Excel 2003
    Posts
    5

    Returning ROW number from MIN value

    This is in furtherance of my last question about returning the ROW number from a MAX value, but now I require a MIN value. I'm tearing my hair out trying to get this to work. I need to find the smallest number in a column (F) that is greater than zero and reference the name in B2.
    I have tried =INDEX($B$2:$B$6,MATCH(SMALL($b$2:$b$6,COUNTIF($f$2:$f$6,0)+1))) but the program tells me I have too few arguments in there. I also need to know how to handle the situation when two (or more) names have sold the same number of units.

    Help would be much appreciated! An example of the workbook is attached.

    Thanks,
    Keith Jones.
    Attached Files Attached Files
    Last edited by KeithMJ; 04-04-2011 at 09:15 AM.

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,601

    Re: Returning ROW number from MIN value

    This will return you row of first minimum value:

    =MATCH(MIN(F:F), F:F, 0)

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

    Re: Returning ROW number from MIN value

    =INDEX($B$2:$B$6,MATCH(SMALL($F$2:$F$6,COUNTIF($F$2:$F$6,0)+1),$F$2:$F$6,0)) corrects your formula for >0 if you have 2 or more matches then you will have to small ,1,2,3 ect
    =INDEX($B$2:$B$6,MATCH(SMALL($F$2:$F$6,COUNTIF($F$2:$F$6,0)+2),$F$2:$F$6,0))
    =INDEX($B$2:$B$6,MATCH(SMALL($F$2:$F$6,COUNTIF($F$2:$F$6,0)+3),$F$2:$F$6,0))
    "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

  4. #4
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Returning ROW number from MIN value

    I went with the helper column approach.
    Attached Files Attached Files

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

    Re: Returning ROW number from MIN value

    unique rank them then use small and countif
    like this
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    03-29-2011
    Location
    Hastings, Sussex
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Returning ROW number from MIN value

    I took bits from each solution offered and it all works very nicely. Thank you, everyone.

+ 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