How to do Double VLOOKUP

Seifeddine87

Board Regular
Joined
Sep 7, 2015
Messages
128
Office Version
  1. 2016
  2. 2011
  3. 2010
HI
im looking for a functions or a way how i can mark "X" under staff ID Matching the Department ID
example:

ABCDCDEFGHIJKLMNO
1Department ID001-SZ002-SZ003-NL004-JW005-GWStaff ID
2T01XX=?????001-SZT01T02T07T08T10T12T14T15
3T09X002-SZT02T05T06T09
4T04XX003-NLT01T03T04
5T14XX004-JWT07T11T04
6005-GWT13T14T15
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Try:

Book1 (version 1).xlsb
ABCDEFGHIJKLMNOPQ
1Department ID001-SZ002-SZ003-NL004-JW005-GWStaff ID
2T01X X  001-SZT01T02T07T08T10T12T14T15
3T09 X   002-SZT02T05T06T09
4T04  XX 003-NLT01T03T04
5T14X   X004-JWT07T11T04
6005-GWT13T14T15
Sheet5
Cell Formulas
RangeFormula
B2:F5B2=IF(SUMPRODUCT(($J$2:$Q$6=$A2)*($I$2:$I$6=B$1)),"X","")
 
Upvote 0
Solution
A less elegant way:

Book1
ABCDEFGHIJKLMNOPQ
1Department ID001-SZ002-SZ003-NL004-JW005-GWStaff ID
2T01X X  001-SZT01T02T07T08T10T12T14T15
3T09 X   002-SZT02T05T06T09
4T04  XX 003-NLT01T03T04
5T14X   X004-JWT07T11T04
6005-GWT13T14T15
Sheet1 (2)
Cell Formulas
RangeFormula
B2:F5B2=IF(ISNUMBER(MATCH($A2,OFFSET($I$1,MATCH(B$1,$I$2:$I$9999,0),1,,8),0)),"X","")
 
Upvote 0
Try:

Book1 (version 1).xlsb
ABCDEFGHIJKLMNOPQ
1Department ID001-SZ002-SZ003-NL004-JW005-GWStaff ID
2T01X X  001-SZT01T02T07T08T10T12T14T15
3T09 X   002-SZT02T05T06T09
4T04  XX 003-NLT01T03T04
5T14X   X004-JWT07T11T04
6005-GWT13T14T15
Sheet5
Cell Formulas
RangeFormula
B2:F5B2=IF(SUMPRODUCT(($J$2:$Q$6=$A2)*($I$2:$I$6=B$1)),"X","")
works perfect thank you very much
 
Upvote 0
A less elegant way:

Book1
ABCDEFGHIJKLMNOPQ
1Department ID001-SZ002-SZ003-NL004-JW005-GWStaff ID
2T01X X  001-SZT01T02T07T08T10T12T14T15
3T09 X   002-SZT02T05T06T09
4T04  XX 003-NLT01T03T04
5T14X   X004-JWT07T11T04
6005-GWT13T14T15
Sheet1 (2)
Cell Formulas
RangeFormula
B2:F5B2=IF(ISNUMBER(MATCH($A2,OFFSET($I$1,MATCH(B$1,$I$2:$I$9999,0),1,,8),0)),"X","")
thank you :)
 
Upvote 0

Forum statistics

Threads
1,215,575
Messages
6,125,613
Members
449,238
Latest member
wcbyers

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