Apr 28 2022 02:25 PM
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
Apr 28 2022 02:30 PM
Apr 28 2022 02:49 PM
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.
Apr 28 2022 04:49 PM
@Hans Vogelaar This did exactly what I needed it to do. Thank you very much. I greatly appreciate it.
Best,
Greg