You are here:

Excel/lookup a value based on a second criteria

Advertisement


Question
I have a table like this

item     Country    description    C4
I1       UK          a1          b1
I1       FR          c1          d2
I1       GE          e1          f1
I2       UK          a2          b2
I2       FR          c2          d2
I3       GE          e2          f2

i want to have a lookup  on eg the criteria I2 AND FR for eg the value in column C4  - which would need to result in d2

How can this be done ?

Answer
You could use an array formula for that:

Assuming you have I2 in cell F2 and FR in G2:

=INDEX($D$2:$D$7,MATCH(F2&"|"&G2,$A$2:$A$7&"|"&$B$2:$B$7,0))

Enter this formula using control+shift+enter.
You will see {} around the formula in the formula bar if you have properly entered the formula.
About Excel
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here

Excel

All Answers


Answers by Expert:


Ask Experts

Volunteer


Jan Karel Pieterse

Expertise

Excel and Excel/VBA questions

Experience

Excel MVP

Organizations
Self employed Excel developer

Education/Credentials
Bachelor in Chemical Engineering

Awards and Honors
Microsoft MVP award since 2002

Past/Present Clients
Shell, Fortis bank, ABN-AMRO bank, Morgan Stanley, ...

©2016 About.com. All rights reserved.