+ Reply to Thread
Results 1 to 11 of 11

reference two tables with multiple criteria; get correct output

  1. #1
    Registered User
    Join Date
    01-19-2014
    Location
    Hamilton, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    27

    reference two tables with multiple criteria; get correct output

    Hi, I have two tables with multiple criteria that I use index and match to pull the right output. See attached. What I cant' figure out is how to pull the right cell when the units on my table are not individual numbers but groups IE if the user enters 25 in C4 the attached example should know to return C9 in for the output.

    My knowledge is limited but I think I need to make some kind of giant nested if statement and build it into my output formula, but that's making my eyes bleed.

    Please see the attached and you'll quickly understand my issue. If you type "Up to 75" in C4 you will see the output 1. If you type 25 it doesn't know what to do.

    Maybe there is a different way to format my tables that would be better. I'm open to anything.

    Thanks

    Moderator note: Since you are new to the forum and seem to be struggling with the title change I am going to change it for you this time as a courtesy.
    Attached Files Attached Files
    Last edited by FlameRetired; 02-09-2020 at 04:24 PM. Reason: thread title

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,687

    Re: help with index & match

    Administrative Note:

    We would very much like to help you with your query, however the thread title does not really convey what your request is about.

    Please take a moment to amend your thread title. Make sure that the title properly explains your request. Your title should be explicit and not be generic (this includes function names used without an indication of what you are trying to achieve).

    Please see Forum Rule #1 about proper thread titles and adjust accordingly. To edit the thread title, open the original post to edit and then click on Go Advanced (bottom right) to access the area where you can edit your title.

    (Note: this change is not optional. No help to be offered until this moderation request has been fulfilled.)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    01-19-2014
    Location
    Hamilton, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    27

    Re: help with index & match

    OK. Did I fix it well enough? If not, I could use some help with the subject......

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,687

    Re: Help with nested ifs in an indexed table

    Your title should tell us what you are trying to do, not how you think it should be done. Please summarise your objective in your thread title. Thanks.

  5. #5
    Registered User
    Join Date
    01-19-2014
    Location
    Hamilton, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    27

    Re: Help with nested ifs in an indexed table

    How about now?
    Last edited by crashycdn; 02-09-2020 at 03:59 PM.

  6. #6
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: reference two tables with multiple criteria; get correct output

    Please see your first post. I changed it for you. That should do it.
    Dave

  7. #7
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: reference two tables with multiple criteria; get correct output

    Is having 'stacked' tables as in your attachment a requirement?

  8. #8
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: reference two tables with multiple criteria; get correct output

    I modified your layout in the attached.

    The formula you were using was attempting to match numbers to text "numbers" in column B. lookup_value and lookup_array of MATCH need to be the same data types. Those across both columns A and B. They present both lower and upper limits as numbers that C4 is to fit between.

    That said I modified your formula in C6 to work with that.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    01-19-2014
    Location
    Hamilton, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    27

    Re: reference two tables with multiple criteria; get correct output

    That's exactly what I needed to do. A slight reformatting of my data, and then the voodoo part you added "(--($C$4>=N(+$A$8:$A$18))*($C$4<=N(+$B$8:$B$18)" is perfect. It's going to take me a minute to get my head around that, but it works perfectly.

    Yes, I need the tables in this stacked format. I have a worksheet with several dozen tables like this.

    Thank you for suggesting the new subject, also. I understand how you changed it and will try to do better with subjects in the future. As a relative newb to both excel and this forum, it's easy to get my head stuck in what I'm trying to do. Sometimes it takes a helping hand to help you see it from a different angle.

    Cheers! This helped me so much, and will help me for years!

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,687

    Re: reference two tables with multiple criteria; get correct output

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  11. #11
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: reference two tables with multiple criteria; get correct output

    You are welcome. Glad to help. Thank you for the feedback and added rep.

+ 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] INDEX+MATCH instead of VLOOKUP+MATCH, why is INDEX a better choice and how to re-write?
    By Renejorgensen in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-23-2016, 10:54 AM
  2. [SOLVED] Index / Match - match 3 input values and return the results from the index
    By t83357 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-08-2016, 07:34 PM
  3. [SOLVED] Match-Index in stead of Index-Match lookup Array among Arrays
    By Numnum in forum Excel General
    Replies: 2
    Last Post: 10-15-2015, 02:08 PM
  4. INDEX MATCH MATCH/OFFSET MATCH MATCH with named ranges
    By Andrew-Mark in forum Excel General
    Replies: 3
    Last Post: 02-27-2015, 10:56 PM
  5. Replies: 6
    Last Post: 04-30-2014, 02:42 AM
  6. Replies: 6
    Last Post: 11-08-2013, 10:29 PM
  7. Replies: 3
    Last Post: 05-02-2013, 01:31 AM

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