+ Reply to Thread
Results 1 to 4 of 4

Display the value of a row with the higher corresponding bottom value

  1. #1
    Registered User
    Join Date
    11-17-2012
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    4

    Display the value of a row with the higher corresponding bottom value

    Hello again.
    Another plea for help. This is my scenario: I have several rows with arbitrary values (rows 1-5, from A to E), and at the bottom of each column (row 8) there are their corresponding 'index' values. I need to print, in the H column, the value of the corresponding cell in the same row with the highest bottom index value, ignoring the zeros (but printing zero in the H column if all the values of a row are zero). The fact that the row values are very similar isn't important at all.

    See the attached .xls for an example:

    1) In the first row, the value in H1 is -100 because the value of its 'index' is 40, and I need to ignore the 0 in B1 even if its index value is 50.
    2) In the second row the value at H2 is 50, because its index value is 30 - again, I'm ignoring the row values equal to zero with index value 40 and 50.
    3) In the third row, the value at H3 is 25, because the 25 in B3 has an index value of 50, the highest.
    4) In the fourth row, the value at H4 is 0, because the row itself contains only zeros.
    5) In the fifth row, the value at H5 is -40, because it has the highest index value (50).

    I cannot create more columns, so I have to work with the preexisting values. I hope my explaination is clear.. and.. thanks in advance, again.
    Attached Files Attached Files

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Display the value of a row with the higher corresponding bottom value

    hi temptemp9, try copying this formula into the formula bar:
    =IF(COUNTIF(A1:E1,0)=5,0,INDEX(A1:E1,MATCH(MAX(IF(A1:E1=0,0,$A$8:$E$8)),$A$8:$E$8,0)))

    press CTRL + SHIFT + ENTER to confirm
    Attached Files Attached Files
    Last edited by benishiryo; 11-18-2012 at 05:36 AM. Reason: added file

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Registered User
    Join Date
    11-17-2012
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Display the value of a row with the higher corresponding bottom value

    Hello benishiryo, thanks for your answer. However, it seems that your formula isn't working. Could it be my fault?

  4. #4
    Registered User
    Join Date
    11-17-2012
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Display the value of a row with the higher corresponding bottom value

    Now it works perfectly! Many, many thanks.

+ 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