Solved

Multiple column Lookup

Posted on 2013-06-17
3
237 Views
Last Modified: 2013-06-19
I want to lookup a value in a table and place it into a specific column.   The lookup is to match two different values from two different columns.    For instance:

I have a source table with three columns:   (there are many more values that that shown here, but this should be enough for the example.
Task                  SubTask                         Title
0007                     01                               Subtask A Title
0007                     02                               SubTask B Title
0007                     03                               Subtask C Title

The table to place the values in has three columns with the same names.

Task                  SubTask                          SubTask Title

So if I have 0007 in the Task column AND 02 in the SubTask column, I will get "SubTask B Title" in the Subtask Title column.   Kind  of like a double VLOOKUP.
0
Comment
Question by:StevenPMoffat
  • 2
3 Comments
 
LVL 23

Accepted Solution

by:
NBVC earned 250 total points
ID: 39254415
Assuming table 1 is in Sheet1, starting at A2... and assuming the inputs are in A2 and B2, respectively of the summary sheet, try something like:


=INDEX(Sheet1!$C$2:$C$100,MATCH(1,INDEX((Sheet1!$A$2:$A$100=A2)*(Sheet1!$B$2:$B$100=B2),0),0))

adjust sheetnames and references to suit...  try not to use whole column references as this formula is not efficient with whole columns....
0
 
LVL 23

Expert Comment

by:NBVC
ID: 39254424
Here is a sample using my technique
Book5.xlsx
0
 

Author Closing Comment

by:StevenPMoffat
ID: 39260563
My original Question had been to do this with tables as opposed to sheets, but I was able to take your idea and convert it into Table References, something like:
=INDEX(SubTask[SubTask Title],MATCH(1,INDEX((SubTask[Task]=EntryTableSubs[[#This Row],[Task '#]])*(SubTask[SubTask]=EntryTableSubs[[#This Row],[SubTask]]),0),0))
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa‚Ķ

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question