+ Reply to Thread
Results 1 to 5 of 5

how do i get field name from result of MAX or LARGE function

  1. #1
    Nick
    Guest

    how do i get field name from result of MAX or LARGE function

    This is probably easy one but I cant figure it out.
    I want to get the field name/label from the same row in the column to the
    left of the result of a MAX or LARGE function. Tried LOOKUP but data is not
    in order.

    e.g.

    A B
    ReasonA 23
    ReasonB 44
    ReasonC 17 I would like MAX function to return 'Reason B'

  2. #2
    Trevor Shuttleworth
    Guest

    Re: how do i get field name from result of MAX or LARGE function

    =INDEX(A:A,MATCH(MAX(B:B),B1:B65534))

    Regards

    Trevor


    "Nick" <[email protected]> wrote in message
    news:[email protected]...
    > This is probably easy one but I cant figure it out.
    > I want to get the field name/label from the same row in the column to the
    > left of the result of a MAX or LARGE function. Tried LOOKUP but data is
    > not
    > in order.
    >
    > e.g.
    >
    > A B
    > ReasonA 23
    > ReasonB 44
    > ReasonC 17 I would like MAX function to return 'Reason B'




  3. #3
    RagDyeR
    Guest

    Re: how do i get field name from result of MAX or LARGE function

    Try this:

    =INDEX(A1:A100,MATCH(MAX(B1:B100),B1:B100,0))

    --

    HTH,

    RD
    =====================================================
    Please keep all correspondence within the Group, so all may benefit!
    =====================================================

    "Nick" <[email protected]> wrote in message
    news:[email protected]...
    This is probably easy one but I cant figure it out.
    I want to get the field name/label from the same row in the column to the
    left of the result of a MAX or LARGE function. Tried LOOKUP but data is not
    in order.

    e.g.

    A B
    ReasonA 23
    ReasonB 44
    ReasonC 17 I would like MAX function to return 'Reason B'



  4. #4
    Nick
    Guest

    Re: how do i get field name from result of MAX or LARGE function

    Thanks so much, it worked great. The ,0)) at the end makes all the
    differance, but why?

    "RagDyeR" wrote:

    > Try this:
    >
    > =INDEX(A1:A100,MATCH(MAX(B1:B100),B1:B100,0))
    >
    > --
    >
    > HTH,
    >
    > RD
    > =====================================================
    > Please keep all correspondence within the Group, so all may benefit!
    > =====================================================
    >
    > "Nick" <[email protected]> wrote in message
    > news:[email protected]...
    > This is probably easy one but I cant figure it out.
    > I want to get the field name/label from the same row in the column to the
    > left of the result of a MAX or LARGE function. Tried LOOKUP but data is not
    > in order.
    >
    > e.g.
    >
    > A B
    > ReasonA 23
    > ReasonB 44
    > ReasonC 17 I would like MAX function to return 'Reason B'
    >
    >
    >


  5. #5
    Ragdyer
    Guest

    Re: how do i get field name from result of MAX or LARGE function

    The 0 at the end makes the Match() function look for exact matches *only*.
    When looking for exact matches, the lookup data table does *not* have to be
    sorted, and since yours (Column B) is not sorted, it returned the correct
    value.
    --
    HTH,

    RD

    ---------------------------------------------------------------------------
    Please keep all correspondence within the NewsGroup, so all may benefit !
    ---------------------------------------------------------------------------


    "Nick" <[email protected]> wrote in message
    news:[email protected]...
    > Thanks so much, it worked great. The ,0)) at the end makes all the
    > differance, but why?
    >
    > "RagDyeR" wrote:
    >
    > > Try this:
    > >
    > > =INDEX(A1:A100,MATCH(MAX(B1:B100),B1:B100,0))
    > >
    > > --
    > >
    > > HTH,
    > >
    > > RD
    > > =====================================================
    > > Please keep all correspondence within the Group, so all may benefit!
    > > =====================================================
    > >
    > > "Nick" <[email protected]> wrote in message
    > > news:[email protected]...
    > > This is probably easy one but I cant figure it out.
    > > I want to get the field name/label from the same row in the column to

    the
    > > left of the result of a MAX or LARGE function. Tried LOOKUP but data is

    not
    > > in order.
    > >
    > > e.g.
    > >
    > > A B
    > > ReasonA 23
    > > ReasonB 44
    > > ReasonC 17 I would like MAX function to return 'Reason B'
    > >
    > >
    > >



+ 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