+ Reply to Thread
Results 1 to 7 of 7

Lookup in several tables

  1. #1
    Registered User
    Join Date
    12-09-2009
    Location
    Chicago
    MS-Off Ver
    Excel 2007
    Posts
    68

    Lookup in several tables

    I am trying to check my work and need to reference something that looks like this:
    (see excel doc row 17-24. This is what I am trying to populate)

    Basically, what I am trying to do here is the following:

    Starting at C18 For all the mini tables I have there,

    If it has that keyword
    And if it is in the Revenue Column
    And if it has the month of Aug

    Then return the value, which in this case should be 265 (cell C8), and 214 (cell G8) etc...

    But I cant get the formula working properly. Anyone have any ideas here?
    Attached Files Attached Files

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Lookup in several tables

    Try:

    =INDEX($B$6:$AB$13,MATCH($C$16,$B$6:$B$13,0),MATCH($B18,$B$5:$AB$5,0)+1)

    where C16 contains the search month: "Aug" (without quotes).

    If you want the corresponding No of Orders, then:

    =INDEX($B$6:$AB$13,MATCH($C$16,$B$6:$B$13,0),MATCH($B18,$B$5:$AB$5,0)+2)
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Valued Forum Contributor scottylad2's Avatar
    Join Date
    09-03-2010
    Location
    edinburgh
    MS-Off Ver
    Office 2007 Prof & Office 2010 Student Edition
    Posts
    629

    Re: Lookup in several tables

    By naming your tables and slightly altering what they are referencing this will work using indirect and indext/match
    Attached Files Attached Files
    Windows 7 using Office 2007 & 2010

    Remember your [ code ] [ /code ] tags, makes reading soooo much easier

  4. #4
    Valued Forum Contributor scottylad2's Avatar
    Join Date
    09-03-2010
    Location
    edinburgh
    MS-Off Ver
    Office 2007 Prof & Office 2010 Student Edition
    Posts
    629

    Re: Lookup in several tables

    I've added a little CF and a Drop Down for your reference, and adjusted in case you also want to pull in the Number of Orders as well
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    12-09-2009
    Location
    Chicago
    MS-Off Ver
    Excel 2007
    Posts
    68

    Re: Lookup in several tables

    Thanks both of you! I actually ended up using NBVC's solution because I got it first, but to be honest scottylad2, I have no idea how your is working ... which is awesome! Can you please explain it more. I would be interested in learning about indirects!

    Thanks again!

  6. #6
    Valued Forum Contributor scottylad2's Avatar
    Join Date
    09-03-2010
    Location
    edinburgh
    MS-Off Ver
    Office 2007 Prof & Office 2010 Student Edition
    Posts
    629

    Re: Lookup in several tables

    By naming your tables keyword1 keyword2 etc, then using the indirect you can reference a cell containing the same text string as your table name and it will convert it to an array of values, in short indirectly referencing whatever table name is in the cell.

    While it works perfectly well with your current set up, it's even better say for instance if all your tables were on different tabs. by naming them and referring by indirect, you can avoid having to use sheet references.

  7. #7
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Lookup in several tables

    Quote Originally Posted by afriedman
    I would be interested in learning about indirects!
    Be aware that INDIRECT is a Volatile function - see link in sig. for more information regards Volatility.

+ 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