For example,
Column A: First Name
Column B: Last Name
Column C: First Name
Column D: Last Name
Column E: ID
I'm looking for a function that will return the value of E in a new column if A matches with C, and B matches with D. Would have to match the names even if they are out of order. For example, A+B might be in row 5 and match with C+D in row 7, then return E
I was able to make a function that matches only the first names, but get stuck trying to add the last names into the equation.
=INDEX(E:E,MATCH(A2,C:C,0))
Thank you in advance!
Try this:
=INDEX($E:$E,MATCH(1,EXACT(A2,$C:$C)*EXACT(B2,$D:$D),0))
The above is an array formula. To enter/confirm an array formula, hold down ctrl + shift while hitting enter. If you do this correctly, Excel will place braces {...}
around the formula seen in the formula bar.
Notes:
#N/A
if there is no match.EXACT
function:=INDEX($E:$E,MATCH(1,(A2=$C:$C)*(B2=$D:$D),0))