Solved

lookup based on two criteria

Posted on 2014-03-24
4
202 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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction This Article is a follow-up to my Mappit! Addin Article (http://www.experts-exchange.com/A_2613.html), it was inspired by an email posting I made to EUSPRIG (http://www.eusprig.org/index.htm), I will briefly cover: 1) An overvie…
Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

706 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

19 Experts available now in Live!

Get 1:1 Help Now