Forum Discussion
gracecurtis
Dec 03, 2024Copper Contributor
XLOOKUP Multiple Lookup Values?
I have a project where I have been using XLOOKUP to pull information from one sheet into another, but my problem is the following: To see if there is a match, I have to check three different lookup v...
- Dec 03, 2024
I found the solution! I needed to use an IFNA function to search for the first two variables, then nest that whole formula within another IFNA function to get the third. This video helped me: https://www.youtube.com/watch?v=AXo9BPqbvxo&t=195s
John_L
Dec 03, 2024Copper Contributor
Try this:
=XLOOKUP("*"&Sheet1!A1&"*",Sheet2!A:A,Sheet2!B:B,XLOOKUP("*"&Sheet1!A1&"*",Sheet2!A:A,Sheet2!C:C,XLOOKUP("*"&Sheet1!A1&"*",Sheet2!A:A,Sheet2!D:D,XLOOKUP("*"&Sheet1!A1&"*",Sheet2!A:A,Sheet2!E:E,2),2),2),2)
No need for IFNAs if you do a second lookup as the error condition of not finding it in the first column.
=XLOOKUP(lookup_value, lookup_array, return_array, [if_not_found], [match_mode], [search_mode])
gracecurtis
Dec 03, 2024Copper Contributor
Thanks! I forgot about that, would definitely speed things up.