+ Reply to Thread
Results 1 to 5 of 5

Two deminsional lookup

Hybrid View

  1. #1
    Registered User
    Join Date
    02-28-2008
    Posts
    3

    Two deminsional lookup

    I am trying to do a lookup in a two deminsional array, where both x and y numbers fall in a range to qualify for a specific row or column. When they are qualified i want to retreive the data at the intersecting cell. How is that done?

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

    e.g

    =Index(TableArray,Match(A1,RowArray,0),Match(A2,ColumnArray,0))

    where A1 and A2 contain the values to match in the row headers and column headers, respectively.

    The TableArray, RowArray and ColumnArray should be replaced with the range references.
    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
    Registered User
    Join Date
    02-28-2008
    Posts
    3

    Two Deminsional Lookup

    =INDEX(Sheet3!$A$2:$Q$17,MATCH(U3,Sheet3!$A$2:$Q$17,0),MATCH(V3,Sheet3!$A$2:$Q$17,0))

    I have tried the following formula only to get #N/A as a result.

    Any ideas?

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

    =INDEX(Sheet3!$A$2:$Q$17,MATCH(U3,Sheet3!$A$2:$A$17,0),MATCH(V3,Sheet3!$B$1:$Q$1,0))

  5. #5
    Forum Contributor WinteE's Avatar
    Join Date
    04-07-2007
    Location
    Netherlands
    Posts
    544
    On my site you'll find a VHLOOKUP() function. This is a UDF (User defined function) so you'll have to copy some code to the VBA section.

    It works like VLOOKUP() but instead of entering an indexnumber for the column you can enter the columnheader.

    Erik
    Just keep it simple !


    http://www.excelguide.eu
    In English as well as in Dutch

+ 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