+ Reply to Thread
Results 1 to 3 of 3

Show a label which corresponds to a max function

Hybrid View

  1. #1
    Registered User
    Join Date
    06-30-2009
    Location
    Halifax NS
    MS-Off Ver
    Excel 2007
    Posts
    9

    Show a label which corresponds to a max function

    I am making a spreadsheet which will display the top performing locations at my company in several different categories.
    The way I have it laid out right now is...
    Category Location Amount
    Category Location Amount etc.
    I have the categories written in as text, and I have the amounts there using the max function... what I don't know is how to show the location which corresponds to the amount found by the max function.

    On the sheet where the Amount is being taken from the name of the location appears on the far left with all the categories coming out from it in subsequent columns. So the Location name I want would always be the furthest to the left column, in the same row as the one chosen by the max function.

    I don't know how to make this work, I'm thinking maybe some variant of offset and if, but I don't know for sure.

    If anyone could help it would be greatly appreciated.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Show a label which corresponds to a max function

    You would use a combination of Index and Match functions...

    eg.

    =Index(LabelRange,Match(MaxNum,Range,0))

    where Label Range is your column of Labels to return...
    MaxNum is the maximum number or cell reference to that number
    Range is the range of numbers to find that max number and pull from the LabelRange.

    e.g =Index($A$1:$A$100,Match(X1,$B$1:$B$100,0)) where X1 contains the Max Number to search for.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,454

    Re: Show a label which corresponds to a max function

    Hi,

    Presuming Category in A1:A100, Location in B1:B100 and Amount in C1:C100

    =index(B1:B100,match(max(C1:C100),C1:C100,0))
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

+ 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