+ Reply to Thread
Results 1 to 4 of 4

Return column header when locating top 20 values

Hybrid View

  1. #1
    Registered User
    Join Date
    07-05-2016
    Location
    New York, NY
    MS-Off Ver
    2016
    Posts
    4

    Post Return column header when locating top 20 values

    Hello!

    I am looking to find the name of the product that has the highest value, second highest value, third highest, etc. all the way to top 20.

    I have hundreds of columns and hundreds of rows, but for each row, I want to find the top 20 among the columns. (See attached excel for what I am looking to do).

    I think this has something to do with the large function and a match, but am not exactly sure how to do it!

    Thank you!
    Sarra
    Attached Files Attached Files

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,420

    Re: Return column header when locating top 20 values

    I think you are looking for something like this in C10:

    =INDEX($C$3:$Q$3,MATCH(LARGE($C$4:$Q$4,COLUMNS($C:C)),$C$4:$Q$4,0))

    Copy across as far as you need to. This assumes unique values in row 4.

    Hope this helps.

    Pete

  3. #3
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 V 2504
    Posts
    13,725

    Re: Return column header when locating top 20 values

    This uses a helper row and includes non-unique values. In the helper row 8 C8 and across.
    Formula: copy to clipboard
    =LARGE($4:$4,COLUMNS($C:C))
    and array enter this in C10 and fill across until you get blanks or as far as you need.
    Formula: copy to clipboard
    =IFERROR(INDEX($C$3:$Q$3,SMALL(IF(C$8=$C$4:$Q$4,COLUMN($C:$Q)-MIN(COLUMN($C:$Q))+1),COUNTIF($C$8:C$8,C$8))),"")
    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.
    Dave

  4. #4
    Registered User
    Join Date
    03-22-2017
    Location
    Canada
    MS-Off Ver
    2010
    Posts
    10

    Re: Return column header when locating top 20 values

    To jump on to this topic: what if they had wanted to include the actual value next to the column header?

+ 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. How to return different column header from 2 same values?
    By maytps in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-07-2015, 10:49 AM
  2. [SOLVED] ID first and last non blank values in a row and return that cells column header
    By hotelmrrsn in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-13-2014, 02:35 PM
  3. [SOLVED] Find specific value in table and return header row and header column value
    By nelwan in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-30-2013, 01:35 AM
  4. Replies: 4
    Last Post: 03-13-2013, 12:38 PM
  5. Return column header, max value, 2 values same
    By bishopisgreat in forum Excel General
    Replies: 1
    Last Post: 09-09-2012, 07:40 AM
  6. [SOLVED] Return column header by comparing multiple row values conditions
    By aschom in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 09-06-2012, 08:52 PM
  7. Find Max values in row then return Column Header
    By mrio in forum Excel General
    Replies: 0
    Last Post: 08-23-2006, 12:47 PM

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