+ Reply to Thread
Results 1 to 6 of 6

find min in a row and display corresponding top cell value of that column

  1. #1
    Registered User
    Join Date
    09-28-2012
    Location
    sweden
    MS-Off Ver
    Excel 2007
    Posts
    14

    find min in a row and display corresponding top cell value of that column

    For eg.

    .....A.......B.......C.......D.......E............F
    1...1.00...1.33...1.5....1.75....2.00.......top cell value
    2...0.60...0.27...0.10...0.15... 0.40.......1.5(C1)
    3...0.78...0.45...0.28...0.03... 0.22.......1.75(D1)
    4...0.78...0.45...0.28...0.03... 0.22.......1.75(D1)
    5...0.78...0.45...0.28...0.03... 0.22.......1.75(D1)
    6...0.60...0.27...0.10...0.15... 0.40.......1.5(C1)

    Columns A1 to E1 contain ratios.
    Column F should display corresponding top cell value of the minimum value in each row.

    Thanks

  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: find min in a row and display corresponding top cell value of that column

    =INDEX($A$1:$E$1,MATCH(MIN(A2:E2),A2:E2,0)) will do it
    "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
    Forum Contributor
    Join Date
    06-07-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    189

    Re: find min in a row and display corresponding top cell value of that column

    Try in F2 copied down

    =INDEX(1:1,MATCH(MIN(A2:E2),A2:E2,0))

  4. #4
    Forum Expert icestationzbra's Avatar
    Join Date
    01-07-2004
    MS-Off Ver
    2007, 2010
    Posts
    1,421

    Re: find min in a row and display corresponding top cell value of that column

    another approach:

    Please Login or Register  to view this content.
    - i.s.z -
    CSE, aka Array aka { }, formulae are confirmed with CONTROL+SHIFT+ENTER.
    Replace commas ( , ) with semicolons ( ; ) in formulae, if your locale setting demands.
    All good ideas are courtesy resources from this forum as well as others around the web.
    - e.o.m -

  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: find min in a row and display corresponding top cell value of that column

    Hi,

    Copy and paste the below formula in F2 cell

    [Formula]
    =IF(COUNT($A2:$E2),INDEX($A$1:$E$1,MATCH(MIN($A2:$E2),$A2:$E2,0)),"")
    [Formula]

    Drag the F2 cell formula for the remaining cells of Column - F.

    Refer the attachment file for details.

    Hope that helps!

    Note: Please don't post the sample data in the body, make it in excel workbook and attach it while asking these type of questions.
    Attached Files Attached Files


    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

  6. #6
    Registered User
    Join Date
    09-28-2012
    Location
    sweden
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: find min in a row and display corresponding top cell value of that column

    Thank you all, everyone's code worked!!

+ 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