+ Reply to Thread
Results 1 to 10 of 10

Returning row and column value from a table

  1. #1
    Registered User
    Join Date
    06-03-2016
    Location
    United States
    MS-Off Ver
    2013
    Posts
    33

    Returning row and column value from a table

    Hello,

    I am attempting to find the max value in a table and return the row value and column value. For example;

    1 2 3
    1 0 0 0
    2 0 3 0
    3 0 0 0

    I would like a formula that would return 2 and 2 in separate cells. I tried vlookup, but since the value of the max cell is the same as a row header it does not return the value I would like. Any help would be much appreciated!

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Returning row and column value from a table

    Can there be duplicate max values?

    If so, what headers should be returned?
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Registered User
    Join Date
    06-03-2016
    Location
    United States
    MS-Off Ver
    2013
    Posts
    33

    Re: Returning row and column value from a table

    There can be duplicate max values. The numbers returned should the lower row and column values for any duplicates.

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Returning row and column value from a table

    Do you want the ACTUAL row and column numbers or do you want the row/column HEADERS?

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Returning row and column value from a table

    How about posting a SMALL sample file (with duplicate max values) and show us what results you expect.

  6. #6
    Registered User
    Join Date
    06-03-2016
    Location
    United States
    MS-Off Ver
    2013
    Posts
    33

    Re: Returning row and column value from a table

    The headers.

  7. #7
    Registered User
    Join Date
    06-03-2016
    Location
    United States
    MS-Off Ver
    2013
    Posts
    33

    Re: Returning row and column value from a table

    Here is an example.
    Attached Files Attached Files

  8. #8
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Returning row and column value from a table

    Try this...

    This array formula** entered in M20:

    =INDEX(M6:V6,MIN(IF(M7:V16=MAX(M7:V16),COLUMN(M7:V16)-COLUMN(M7)+1)))

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.

    This formula entered in M19:

    =INDEX(L7:L16,MATCH(MAX(M7:V16),INDEX(M7:V16,,MATCH(M20,M6:V6,0)),0))

    The formula in M19 uses the result of the formula in M20.

  9. #9
    Registered User
    Join Date
    06-03-2016
    Location
    United States
    MS-Off Ver
    2013
    Posts
    33

    Re: Returning row and column value from a table

    Wow that is perfect! Thank you Tony!

  10. #10
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Returning row and column value from a table

    You're welcome. Thanks for the feedback!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 6
    Last Post: 12-10-2013, 05:34 PM
  2. Dynamic matching cell in table and returning column
    By geoffffffff in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-25-2013, 10:47 AM
  3. Replies: 1
    Last Post: 07-31-2013, 04:11 PM
  4. Returning data in one table based on the values from another table
    By excelignorant in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 05-24-2013, 04:12 AM
  5. Replies: 5
    Last Post: 09-12-2012, 01:27 PM
  6. Matching a value in a specified row in a table and returning column title
    By katherine578 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-03-2011, 10:33 AM

Tags for this Thread

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