+ Reply to Thread
Results 1 to 3 of 3

Finding column Heading based on max row value

Hybrid View

  1. #1
    Registered User
    Join Date
    12-20-2007
    Posts
    1

    Finding column Heading based on max row value

    Hi there,

    I'm trying to return a colum heading based on the maximum value in the rows below. Getting the max value is easy using MAX but does anyone know how I can return the value of the the column heading for this max value?


    Table

    Tom ...... Fred .....Harry
    5 ....... 10....... 20
    17 ...... 12 ....... 6
    45 ...... 100 ....... 36


    Results

    Max value Belongs to
    20 .............Harry
    17 ............Tom
    100 ...........Fred

    many thanks

    Sandies
    Last edited by Sandies; 12-20-2007 at 03:05 AM.

  2. #2
    Forum Contributor corinereyes's Avatar
    Join Date
    12-02-2003
    Location
    Philippines
    MS-Off Ver
    MS Excel 2016
    Posts
    520
    Hi,

    Assuming that the max value is in C2 (Harry 20), try this formula on cell D2

    =MID(ADDRESS(ROW(C2),COLUMN(C2)),2,FIND("$",ADDRESS(ROW(C2),COLUMN(C2)),2)-2)
    If you want the cell address (column and row heading) try this:

    =ADDRESS(ROW(C2),COLUMN(C2))
    Corine

  3. #3
    Forum Contributor corinereyes's Avatar
    Join Date
    12-02-2003
    Location
    Philippines
    MS-Off Ver
    MS Excel 2016
    Posts
    520

    other solution

    Hi Sandies,

    Opsss, silly me, i didn't read the whole question, i thought you were asking how to find the column address of the max value. Anyway i think here is the solution you want.

    A1:Tom	B1:Fred	C1:Harry
    A2:5	B2:10	C2:20
    A3:17	B3:12	C3:6
    A4:45	B4:100	C4:36

    on cell A7 enter this formula:
    =MAX(A2:C2) copy down up to A9

    on cell B7 enter this formula:
    =INDEX($A$1:$C$1,1,MATCH(MAX(A2:C2),A2:C2,0))
    copy down up to cell B9

    RESULT will look something like this:

    20	Harry
    17	Tom
    100	Fred

+ 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