[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

lookup based on two criteria

Posted on 2014-03-24
4
Medium Priority
?
209 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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.
Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
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 the scrolling table in Microsoft Excel using the INDEX function.

649 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