I am trying to write an excel XLOOKUP query.
Where I have 2 table –
Table 1
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")
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))

