Lookup Based on 2 criteria

karmaimages

Board Regular
Joined
Oct 1, 2009
Messages
112
Office Version
  1. 365
Platform
  1. Windows
Hello

I'm trying to perform a lookup but need to add 2 criteria for the lookup bit don't know how this could be done. I have 2 sheets in the workbook which look like the following (I'm unable to upload a copy as I can't add the addon to work laptop)


ABCDEFG
1
Year​
2
2023​
3Person Department
4Job Bloggs**Insert dept using lookup**


ABC
1Jo Bloggs2022
2Jo Bloggs2023Sales
3Jo Bloggs2023Sales
4

What I need to do with the lookup is lookup Jo Bloggs on Sheet 2 and pull in the Department where the year taken from Cell B2 matches against column B in sheet 2 and ignore anythng that isn't the year selected.

Any suggestions on how to do this?
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
i'm assuming "Job Bloggs" is supposed to be "Jo Bloggs", or vice-versa? as long as the match?
 
Upvote 0
try this
Excel Formula:
=INDEX(Sheet2!C1:C3,MATCH(1,(Sheet2!A1:A3=D4)*(Sheet2!B1:B3=B2),0))
 
Upvote 0

Forum statistics

Threads
1,214,979
Messages
6,122,561
Members
449,089
Latest member
Motoracer88

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top