+ Reply to Thread
Results 1 to 9 of 9

Return Row Label and Column Label for Max Value in a Table

  1. #1
    Registered User
    Join Date
    04-16-2017
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2016
    Posts
    1

    Return Row Label and Column Label for Max Value in a Table

    Hello,

    I have a table below that I want to be able to automatically pull some information from, to create a top ten table. Each number in the table represents a team's score for that day. I want to know what the highest score of any day was, whose team had it, and what day it occurred on.

    So in this table, C14 will pull 98 (I know how to do this with MAX or LARGE), D14 will say "Orange", and E14 will say "4-Mar". Then I'd further apply these formulas to the rest of the top ten.

    I've tried a few things with INDEX and MATCH, but I can't get anything to work at this point. The trouble I run into is that I don't necessarily know which row or column will have the value of interest.

    Many thanks to anyone who can help me!

    Excel Question.jpg

  2. #2
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Return Row Label and Column Label for Max Value in a Table

    supertom37 welcome to the forum.

    As a new member you may not be aware of the ability to upload workbooks.

    It's encouraged. We can't copy / paste from pictures and some can't upload pics and screen shots due to company policies, firewalls and such. Some browsers can't view them either. It also saves having to retype data you already have.

    I went ahead and uploaded my own fake data this time.

    In D14:D23 is what you've already figured out.
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    The others are array formulas. If you aren’t familiar with array-entered formulas array enter means the formula must be committed from edit mode by simultaneously pressing and holding down Ctrl and Shift while hitting Enter.

    In E14 array entered and filled down
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    In F14 array entered and filled down.
    Formula: copy to clipboard
    Please Login or Register  to view this content.



    A
    B
    C
    D
    E
    F
    G
    H
    I
    1
    2
    Team
    3-Mar
    4-Mar
    5-Mar
    6-Mar
    7-Mar
    8-Mar
    9-Mar
    3
    Yellow
    64
    85
    40
    85
    24
    81
    59
    4
    Black
    81
    47
    81
    29
    6
    66
    84
    5
    Green
    12
    28
    80
    15
    75
    -5
    17
    6
    Orange
    41
    91
    -4
    69
    84
    41
    67
    7
    Red
    70
    97
    78
    53
    55
    45
    20
    8
    White
    54
    14
    59
    4
    8
    -2
    90
    9
    Blue
    1
    65
    97
    37
    89
    4
    73
    10
    Purple
    85
    56
    37
    69
    74
    59
    85
    11
    12
    13
    Points
    Team
    Date
    14
    1st
    97
    Red
    4-Mar
    15
    2nd
    97
    Blue
    5-Mar
    16
    3rd
    91
    Orange
    4-Mar
    17
    4th
    90
    White
    9-Mar
    18
    5th
    89
    Blue
    7-Mar
    19
    6th
    85
    Yellow
    4-Mar
    20
    7th
    85
    Yellow
    6-Mar
    21
    8th
    85
    Purple
    3-Mar
    22
    9th
    85
    Purple
    9-Mar
    23
    10th
    84
    Black
    9-Mar
    Dave

  3. #3
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: Return Row Label and Column Label for Max Value in a Table

    Hey SuperTom and Dave,

    I have another method for doing this problem without using formulas. Because Supertom has Excel 2016 he can use Get & Transform to do all the work. Here are the steps...

    1. Open up Dave's attached workbook
    2. Select the range from B2 to I10 and leave it selected.
    3. Click on the Data Tab -> From Table (it is in the Get & Transform icon group)
    4. Click on the box in the "Create Table" dialog to show "My table has headers" and then OK.
    5. You will now see the data in the new tool - new to 2016 and add-in for 2010 and 2013
    6. Right Click on the work Team (above column 1) and then on "UnPivot Other Columns.
    7. Click on the dropdown next to "Value" and then on "Sort Descending"
    8. Click on "Close & Load" dropdown and the Close & Load To sub-menu.
    9. Click on Existing worksheet and make $H$13 in the "Select a Range"
    10. Click on Load

    See the answer without ever typing a formula. See the attached with the answer.
    PQ Unpivot Answer.xlsx
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  4. #4
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Return Row Label and Column Label for Max Value in a Table

    @ MarvinP,

    That's impressive.

    Must get add-in.

  5. #5
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: Return Row Label and Column Label for Max Value in a Table

    Hey,

    If you install the Power Query Add-In, you will have an inserted step. The Add-In has a tab called Power Query. You will need to click on it after selecting the range. Then find "From Table" on the ribbon. In 2016 all the tools are in a new group called "Get & Transform".

  6. #6
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Return Row Label and Column Label for Max Value in a Table

    Thanks. I checked that out @ a year ago. Turned out Power Query add-in is only available certain SKUs of 2013; mine isn't one of them.

  7. #7
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: Return Row Label and Column Label for Max Value in a Table

    Time to upgrade?

  8. #8
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Return Row Label and Column Label for Max Value in a Table

    I'm fighting it. Reports on the desktop version(s) suggest they aren't much of an upgrade, and I feel uneasy about the subscription route. Still that solution you posted is cool.

  9. #9
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: Return Row Label and Column Label for Max Value in a Table

    With the subscription, I get new features every month or two. I open any office app and click on Account and check for updates.

+ 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. Macro to Use column label as row label for multiple cells
    By MatLCFC in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-16-2015, 12:18 PM
  2. Pivot Table - Search Row Label, Return column value
    By PORTER88 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-13-2015, 02:33 AM
  3. With a move label macro, prevent label from moving onto another label
    By SocratesJC in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-09-2014, 12:34 AM
  4. Replies: 6
    Last Post: 01-07-2014, 03:24 PM
  5. Replies: 1
    Last Post: 09-30-2013, 09:52 AM
  6. Replies: 11
    Last Post: 07-18-2013, 05:14 PM
  7. Filter Pivot Table Row Label by Another Row Label
    By bdcelli in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 01-14-2013, 12:57 PM

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