Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

XLOOKUP match emails

I am trying to write an excel XLOOKUP query.

Where I have 2 table –

Table 1

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Email           Found/Not Found
user1@ss.se
user2@ss.se    
user3@ss.se
user4@ss.se

Table 2

Email
user2@ss.se    
user3@ss.se

In table 1 I want to find if any of the emails can be found in table 2. If the emails is found the result should be found else not found

Expected result

Email          Found/Not Found
user1@ss.se   Not Found
user2@ss.se    Found
user3@ss.se   Found
user4@ss.se   Not Found

I have tried this query but it is giving me an error message

=XLOOKUP(A2;table2!A2:A5;"Found";"";0)

>Solution :

Use Match:

=IF(ISNUMBER(MATCH(A2,table2!$A$2:$A$5,0)),"Found","Not Found")

enter image description here

If you really want to use XLOOKUP, we need to do some trickery.

=LET(lkp,table2!$A$2:$A$5,XLOOKUP(A2,lkp,INDEX({"found"},SEQUENCE(ROWS(lkp),,1,0)),"not found",0))

enter image description here

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading