+ Reply to Thread
Results 1 to 3 of 3

Need Help: Sum a range and return adjacent data tied to largest digit.

  1. #1
    Registered User
    Join Date
    02-19-2013
    Location
    United States
    MS-Off Ver
    MAC 2011
    Posts
    2

    Need Help: Sum a range and return adjacent data tied to largest digit.

    I am working on a project that needs to execute the sum of three related Rows (B2:B4), Then I need to ensure the sum is "greater than or equal to" a constant (B48). If so, I need to return the adjacent data in the row that contains the largest datapoint of the 3 row-range.

    I used the formula below but I get #Value...so I included the IFERROR which only got rid of the error (obviously). Any ideas?

    =IFERROR(IF(SUM(B2:B4>=$B$48),(VLOOKUP(MAX(B2:B4),A2:B4,1,FALSE))," ")," ")
    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: Need Help: Sum a range and return adjacent data tied to largest digit.

    hi definajoe, welcome to the forum. so currently B2:B4 contains:
    2
    3
    4
    And B48 contains 4. the SUM would be 9 & therefore greater than 4. hence, it should show what? the MAX of B2:B4, which is 4? and then look in column A to return the text? you cant use VLOOKUP to lookup backwards. use INDEX instead.
    =IF(SUM(B2:B4)>=$B$48,INDEX(A2:A4,MATCH(MAX(B2:B4),B2:B4,0)),"")

    and if the logic fails, you can show a blank straight away without using IFERROR

    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
    02-19-2013
    Location
    United States
    MS-Off Ver
    MAC 2011
    Posts
    2

    Re: Need Help: Sum a range and return adjacent data tied to largest digit.

    Worked Like a Charm!... I need to work it into the remainder of the sheet now. Thank you

+ 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