+ Reply to Thread
Results 1 to 13 of 13

Trouble with lookups and name ranges

  1. #1
    Registered User
    Join Date
    08-13-2014
    Location
    Australia
    MS-Off Ver
    365
    Posts
    25

    Trouble with lookups and name ranges

    Hello,

    I am trying to find the right formula to return data required in sheet. I have attached a file which contains my data on the left and the row where I want to perform the calculation on the right.

    In the calculation row, I basically want a formula in U3 that will say: lookup the contents of columns L, M, N in the table and return the right answer (in this example that would be Cell b:24).

    I have tried lookup tables and named ranges but obviously doing something right. I need a formula that would work with lots of variables in columns L,M,N.

    Many thanksCLASS SAMPLE.xlsx

  2. #2
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: Trouble with lookups and name ranges

    in your data, given the three parameters there are 2 possible answers how do you isolate the 24th row?

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Trouble with lookups and name ranges

    It's not clear how you got B24 as the result from: "MDN + ALB + 311". It could just as easily be B13 to my eye.

    311 and MDN could be used as X and Y axis in a normal flat table, but the MDN appears multiple times and it isn't clear how ALB would vary the results.

    You need to make it 100% clearn how B24 and only B24 is that answer, with multiple instances of ALB and MDN, it's not evident.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  4. #4
    Registered User
    Join Date
    08-13-2014
    Location
    Australia
    MS-Off Ver
    365
    Posts
    25

    Re: Trouble with lookups and name ranges

    Sorry, uploaded the wrong version of the sample file. Yes you are both right, MDN appeared twice which I have corrected in the new uopload file

    NEW CLASS SAMPLE.xlsx

  5. #5
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Trouble with lookups and name ranges

    INDEX/MATCH/MATCH can be used to lookup a value in an XY table.

    =INDEX($B$5:$F$46, MATCH(L3, $A$5:$A$46, 0), MATCH(M3, $B$4:$F$4, 0))

    This uses the 311 and the MDN to target the XY coordinates. ALB isn't used.

  6. #6
    Registered User
    Join Date
    08-13-2014
    Location
    Australia
    MS-Off Ver
    365
    Posts
    25

    Re: Trouble with lookups and name ranges

    Thank you for the reply. I fear that this will not work, as I said in my original post, there will be lots of variables in columns L,M,N. Of these, there will be times when L=MDN, M=331 and N will = something else other than ALB. Therefore, each of the 3 columns (L,M,N) will have variables, and there will be times when 2 of them will be the same as other variations.

    Basically, column L is a class (there are about 8 of these classes), column M is a venue and column N is a distance. There are multiple distances at any venue, there are multiple times different venues have the same distance - and all combinations of those 2 variables all have a variety of all 8 of the classes.

    So I need something that will do a match on all 3 variables if that is possible.

  7. #7
    Registered User
    Join Date
    08-13-2014
    Location
    Australia
    MS-Off Ver
    365
    Posts
    25

    Re: Trouble with lookups and name ranges

    Just further to the above post (reply). I can get a similar index/match formula to work when there are only 2 variables, but I just cant get the syntax right to make it work with all 3 variables.

  8. #8
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Trouble with lookups and name ranges

    Your data does not demonstrate how other values other than ALB will be represented in the main table. Update your sample. Show a complete data set with 2-3 different examples of the LMN lookup values and the expected results.
    Last edited by JBeaucaire; 09-02-2014 at 01:05 AM.

  9. #9
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: Trouble with lookups and name ranges

    I think that a search key buildup is in place. combine ALB&331 and all likes in a row so you have only 2 variables without losing the uniqueness of the third variable

  10. #10
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Trouble with lookups and name ranges

    Your data does not demonstrate how other values other than ALB will be represented in the main table. Update your sample. Show a complete data set with 2-3 different examples of the LMN lookup values and the expected results.

  11. #11
    Registered User
    Join Date
    08-13-2014
    Location
    Australia
    MS-Off Ver
    365
    Posts
    25

    Re: Trouble with lookups and name ranges

    Quote Originally Posted by JBeaucaire View Post
    Your data does not demonstrate how other values other than ALB will be represented in the main table. Update your sample. Show a complete data set with 2-3 different examples of the LMN lookup values and the expected results.
    I have attached a new sample file to better show variables.NEW CLASS SAMPLE.xlsx

  12. #12
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Trouble with lookups and name ranges

    In AB4, then copied down:

    =INDEX($B$5:$L$46, MATCH(R4, $A$5:$A$46, 0), MATCH(T4&"-"&S4, INDEX($B$1:$L$1&"-"&$B$4:$L$4, 0), 0))


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

  13. #13
    Registered User
    Join Date
    08-13-2014
    Location
    Australia
    MS-Off Ver
    365
    Posts
    25

    Re: Trouble with lookups and name ranges

    Thank you so much, true genius at work.

+ 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. Need multiple lookups within data ranges to pull in price results
    By JAM78 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-12-2013, 04:56 PM
  2. trouble with lookups and dropdowns
    By cabinetmember in forum Excel General
    Replies: 1
    Last Post: 03-23-2009, 03:33 PM
  3. [SOLVED] Trouble with selecting multiple ranges of data
    By markag in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-23-2006, 11:40 AM
  4. [SOLVED] Trouble with Filtered Ranges
    By Rajesh in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-06-2005, 10:50 AM
  5. lookups and ranges
    By Dillonstar in forum Excel General
    Replies: 1
    Last Post: 10-20-2005, 08:58 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