+ Reply to Thread
Results 1 to 12 of 12

INDEX MATCH - Selecting lowest value in a range of values

  1. #1
    Registered User
    Join Date
    07-21-2013
    Location
    Washington
    MS-Off Ver
    Excel 2010
    Posts
    6

    INDEX MATCH - Selecting lowest value in a range of values

    This will probably seem pretty simple but it's been kicking my behind all day.

    I have a table formatted like this:

    MODEL VOLUME COST
    A11111 2000 .0055
    A11111 3000 .0045
    B22222 2500 .0060
    B22222 5000 .0050

    My input cells are: MODEL and VOLUME
    The output should be the cost.

    Using A11111 for MODEL from a drop down menu and entering a variable number into the VOLUME Field:

    if the volume is less 3000 the cost should be .0055
    if the volume is greater than 3000 the cost should be .0045

    So, if I use A11111 for MODEL and 2500 for VOLUME the COST should be: .0055

    Using this formula I can get an exact match:

    Please Login or Register  to view this content.
    I still need to be able to get the "in betweens". I cannot sort the table. Thanks for any help in advance!

    Rob

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,955

    Re: INDEX MATCH - Selecting lowest value in a range of values

    Hi and welcome to the forum

    This seems like a pretty straight-forward IF() (or maybe nested IF) formula?

    based on this...
    if the volume is less 3000 the cost should be .0055
    if the volume is greater than 3000 the cost should be .0045
    something like...
    =if(A1<3000,.0055,.0045)

    You didnt mention anything about how the A and B models play into this, so I haver a feeling this is not quite this simple, right?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: INDEX MATCH - Selecting lowest value in a range of values

    I cannot sort the table
    and why not?
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  4. #4
    Registered User
    Join Date
    07-21-2013
    Location
    Washington
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: INDEX MATCH - Selecting lowest value in a range of values

    Thanks! I've been lurking around here for a good while. Very helpful posts!!

    You are correct. There are hundreds of models and each one has a different volume/cost structure.

    I'll play round with IF's and see what I can come up with.

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,955

    Re: INDEX MATCH - Selecting lowest value in a range of values

    If you have "hundreds of models", then IF() is not thw way to go.

    Can you upload a SMALL sample workbook, showing what you have and what you want?

  6. #6
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: INDEX MATCH - Selecting lowest value in a range of values

    the thing is the construct $F$7&$G$7 makes text string so can never be used in a range argument in match against a number value

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,955

    Re: INDEX MATCH - Selecting lowest value in a range of values

    Im thinking that a table with models in column A and Volumes across the top in row 1, will let you use an index/match/match or vlookup/match function

  8. #8
    Registered User
    Join Date
    07-21-2013
    Location
    Washington
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: INDEX MATCH - Selecting lowest value in a range of values

    ok. I will construct a workbook and post it. I have to run an errand but will revisit when I return. Thanks!!

  9. #9
    Registered User
    Join Date
    07-21-2013
    Location
    Washington
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: INDEX MATCH - Selecting lowest value in a range of values

    TESTBOOK.xlsx

    Here is a sample workbook.

  10. #10
    Registered User
    Join Date
    07-21-2013
    Location
    Washington
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: INDEX MATCH - Selecting lowest value in a range of values

    This formula gets me so close... I've been working on ways to get the true/false values to work out.

    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    07-21-2013
    Location
    Washington
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: INDEX MATCH - Selecting lowest value in a range of values

    I played with this and found a solution that works. I have attached a workbook with the solution integrated. Using INDEX/MATCH and inserting a value of zero at the lower end I was able to make the formula work. It's workable within the real table and as I am changing it I will work with it's structure to make it sortable. Kind of like killing two birds with one stone.

    Thanks!

    Rob

    TESTBOOK.xlsx

    This is the code that works:

    Please Login or Register  to view this content.

  12. #12
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: INDEX MATCH - Selecting lowest value in a range of values

    INDEX(COST, MATCH(E18&F18, (MODEL&VOLUME), 1)) works as you have found because fortunately the addition of a zero doesnt affect the fact that the when concatenated they are sorted ascending it might not work if you add models in a different alphabetical order

+ 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. Replies: 17
    Last Post: 12-05-2012, 09:01 PM
  2. VBA - Index double match and insert values in range
    By Biinge in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 12-02-2011, 02:43 PM
  3. Index lowest value minus match value
    By JuJuBe in forum Excel General
    Replies: 4
    Last Post: 07-27-2010, 04:20 PM
  4. MATCH INDEX For looking up lowest date
    By TonEUK in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-22-2007, 07:11 PM
  5. [SOLVED] How do I find the two lowest values in a range?
    By dlroelike in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-20-2005, 09:06 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