+ Reply to Thread
Results 1 to 10 of 10

Basic lookup formula on the next greatest value in a range

  1. #1
    Registered User
    Join Date
    04-21-2011
    Location
    Boston
    MS-Off Ver
    Excel 2010
    Posts
    61

    Basic lookup formula on the next greatest value in a range

    Hello everyone,

    I am struggling to come up with the sumifs/index formula to pull a simple rate out of a table. I am looking for the formula to calculate the rate based on the weight input, and then to look up the next highest weight that would cover that rate. In the example attached I have different weights in kilos, which are for inputs up to that weight, anything over would go to the next weight rate.

    In cell D4 of the example I have entered a 0.55 kg weight and I would like the formula to lookup the next or equal weight, in this case it would be the 0.75 kilo rate. If D4 was exactly 0.5 kg then I would want it to pull the 0.5 kg weight.

    I know it should be a straightforward formula but I can't seem to figure it out.

    Thanks a bunch!
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,065

    Re: Basic lookup formula on the next greatest value in a range

    I bet someone comes up with a much better way

    =INDEX(B3:B16,MATCH(D4,A3:A16,1)+1-(NOT(ISNA(MATCH(D4,A3:A16,0)))),1)
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Basic lookup formula on the next greatest value in a range

    Maybe
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  4. #4
    Registered User
    Join Date
    04-21-2011
    Location
    Boston
    MS-Off Ver
    Excel 2010
    Posts
    61

    Re: Basic lookup formula on the next greatest value in a range

    Thanks for the replies guys. It seems this doesn't work for weights between 0-0.25kg

  5. #5
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,650

    Re: Basic lookup formula on the next greatest value in a range

    Move the headers, Kilo and Rate, up to A1:B1.
    Type zeroes into cells A2:B2.
    Modify ChemistB's formula to read: =INDEX($B$2:$B$16, MATCH(ROUND(D4,2)-0.01,$A$2:$A$16,1)+1)
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  6. #6
    Forum Expert
    Join Date
    12-09-2014
    Location
    Trakai, Lithuania
    MS-Off Ver
    2016
    Posts
    1,298

    Re: Basic lookup formula on the next greatest value in a range

    I propose such a formula
    =ИНДЕКС(B3:B16;ПОИСКПОЗ(АГРЕГАТ(15;6;A3:A16/(A3:A16>D4);1);A3:A16;0))

  7. #7
    Forum Contributor
    Join Date
    08-14-2018
    Location
    Hanoi, Vietnam
    MS-Off Ver
    2016
    Posts
    118

    Re: Basic lookup formula on the next greatest value in a range

    Try
    Please Login or Register  to view this content.

  8. #8
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 2019
    Posts
    2,373

    Re: Basic lookup formula on the next greatest value in a range

    Another add, put this on E4 and ENTERED all together CTRL+SHIFT+ENTER because this array formula:

    =INDEX(B3:B16,MATCH(MIN(ABS(A3:A16-D4)),ABS(A3:A16-D4),0))
    Attached Files Attached Files

  9. #9
    Forum Contributor
    Join Date
    08-14-2018
    Location
    Hanoi, Vietnam
    MS-Off Ver
    2016
    Posts
    118

    Re: Basic lookup formula on the next greatest value in a range

    @azumi
    albardit18 need to get exact match value or the next higher value, not the closest value.
    For example, D4=1.26 then the return value must be $20.75

  10. #10
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 2019
    Posts
    2,373

    Re: Basic lookup formula on the next greatest value in a range

    @congnt92, that's what my formula does, just try it

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Need formula to provide sums from a lookup range for a lookup-range group of values
    By attilathepun in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-29-2018, 08:24 PM
  2. Can I set a minimum/maximum range for a certain basic formula?
    By Robmeister89 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-13-2016, 08:04 PM
  3. Replies: 1
    Last Post: 07-27-2012, 02:37 PM
  4. Replies: 6
    Last Post: 05-12-2012, 11:40 AM
  5. Replies: 12
    Last Post: 11-16-2009, 09:13 PM
  6. Greatest difference between a consecutive range of dates
    By Hugsie Bear in forum Excel General
    Replies: 3
    Last Post: 07-27-2006, 06:55 AM
  7. Greatest difference between a consecutive range of dates
    By Hugsie Bear in forum Excel General
    Replies: 1
    Last Post: 07-26-2006, 05:18 PM

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