+ Reply to Thread
Results 1 to 7 of 7

send back cell to the right of max :)

  1. #1
    Registered User
    Join Date
    05-23-2013
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    11

    send back cell to the right of max :)

    Hi,
    I am sorting some data in rows. I need to find the max value and then the next two values after that, whatever they are, and then reference all three in a row. I know how to do =MAX but how do I do an offset of some sort to find the two cells to the right of the max?

    ex:
    output
    max - value after - value after that

    data
    0 10 45 35 40 20 15 12 10

  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: send back cell to the right of max :)

    Try this...

    With your data in the range A1:I1...

    Enter this formula in A5 for the max value:

    =MAX(A1:I1)

    Enter this formula in B5 and copy across to C5:

    =INDEX($A1:$I1,MATCH($A5,$A1:$I1,0)+COLUMNS($B5:B5))

    This assumes there will always be 2 cells to the right of the max cell.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Registered User
    Join Date
    05-23-2013
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: send back cell to the right of max :)

    Biff. Thanks. Worked!

  4. #4
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: send back cell to the right of max :)

    how about offset maybe.

    =MAX(OFFSET(A1:H1,0,MATCH(MAX(A1:H1),A1:H1,0)+1))
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

  5. #5
    Registered User
    Join Date
    05-23-2013
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: send back cell to the right of max :)

    Wait, actually - when the first value in the row was the max, the formula =INDEX($A1:$I1,MATCH($A5,$A1:$I1,0)+COLUMNS($B5:B5)) shoots back #N/A for the second two values.

    Any ideas?

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

    Re: send back cell to the right of max :)

    You're welcome. Thanks for the feedback!

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

    Re: send back cell to the right of max :)

    Works OK for me.

    The only time it won't work is if there are not 2 cells in the range to the right of the cell that contains the max value.

    Here's a small sample file that demonstrates this:

    HeikEve.xls

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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