?
Solved

lookup based on two criteria

Posted on 2014-03-24
4
Medium Priority
?
208 Views
Last Modified: 2014-03-25
Hello experts,

I need your help.  See attached sample file.

On Sprint tab, add formula to column B
Lookup Site ID of Col A from AD tab Col A
Find associated row that matches "office Manager"
then return associated email from column D
See sample entries.

Same for "General Manager" in Column C of Sprint tab.

thanks,

Gary - Cincinnati
Contacts-for-Cintas-Connect-3-12.xlsx
0
Comment
Question by:garyrobbins
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 23

Expert Comment

by:NBVC
ID: 39951091
Since your AD tab has 32,000 + entries, and you are looking up based on multiple criteria, I would recommend that you add a helper column to AD.

in E2:

=A17&"_"&B17

copied down

This concatenates the Location and Title.

Then formula in Sprint!B2:

=IFERROR(INDEX(AD!C:C,MATCH(A2+0&"_*"&"Office Manager"&"*",AD!E:E,0)),"")

in C2:

=IFERROR(INDEX(AD!C:C,MATCH(A2+0&"_*"&"General Manager"&"*",AD!E:E,0)),"")

both copied down
0
 

Author Comment

by:garyrobbins
ID: 39951154
Thanks, NBVC.

Formula stops when I get down to Site IDs with letters in them, e.g. 26A.  How could the solution be changed?

FYI, I changed your formula to return the "emails" from Col D instead of "displayNames" from, Col C:

=IFERROR(INDEX(AD!D:D,MATCH(A2+0&"_*"&"Office Manager"&"*",AD!E:E,0)),"")

Gary
0
 
LVL 23

Accepted Solution

by:
NBVC earned 1000 total points
ID: 39951261
Try changing the helper formula to:

=TEXT(A17,"000")&"_"&B17

and then your formula in Sprint sheet to:


=IFERROR(INDEX(AD!D:D,MATCH(TEXT(A2,"000")&"_*"&"Office Manager"&"*",AD!E:E,0)),"")
0
 

Author Closing Comment

by:garyrobbins
ID: 39953558
Excellent solution, NBVC!

Thank you for the creative and timely solution.

Experts-Exchange ROCKS!
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

752 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