Match two columns in Excel and return a third

Let’s say that we have three columns. The first column consists of user ids (A), the second column have a corresponding name (B), and the third one (D) also has ids.

What we want to do is to check whether the id from column D exists in columns A and if this is true, then return the corresponding name into column E.

This is our example.

Let’s create a formula that will place the correct value from the column B into column E. Enter the following formula into cell E2 and use autofill to complete the rest of the examples.

=IF(ISNUMBER(MATCH(D2,$A$1:$A$11,0)),VLOOKUP(D2,$A$1:$B$11,2,0),””)

This will return the following result.