Solved

lookup based on two criteria

Posted on 2014-03-24
4
203 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
  • 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 500 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

864 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now