If/Or Formula Multiple Data

Copper Contributor

Hello, I have a data set as such, 

               A                          B          C

unique email address 1 |    5     | 

unique email address 2 |    7     | 

unique email address 3 |    9     | 

unique email address 4 |    2     | 

 

I'm looking to write an If statement that I can place in Column D that will say, "If A1=(input all my unique email addresses), B2). I have a data set of a few thousand email addresses. I only need to pull the data in Column B for a few hundred of them. How would I write a formula to search each cell in the A column to compare against my entire list of emails I need to identify, and if any of those email addresses are in that cell in the A Column to place the data in the B cell of that row into the D row of that cell? 

 

Thank you in advance. I greatly appreciate it. 

 

Greg

 

3 Replies
For clarification, there are thousands of rows of unique email addresses in Column A. I only need to identify a few hundred, which I have in a separate column and can copy/paste into the formula.

Thank you again,
Greg

@gmitty 

Copy the email address that you want to look up into column C, starting in C1.

Enter the following formula in D1:

=XLOOKUP(C1,$A$1:$A$10000,$B$1:$B$10000,"")

This should work in Excel in Microsoft 365 or Office 2021. If you have an older version:

=IFERROR(VLOOKUP(C1,$A$1:$B$10000,2,FALSE),"")

If columns A/B contain more than 10000 rows of data, adjust the formula accordingly.

Fill down from D1.

@Hans Vogelaar This did exactly what I needed it to do. Thank you very much. I greatly appreciate it. 

 

Best,

Greg