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.


This will return the following result.