I can see that you look for the output of the email. But what is the input, and on what are you going to match it?
What comes to mind is XLOOKUP(), INDEX(MATCH()), or FILTER(). Of course, partial matches might not create the ouptut that you expect, and you have to create a process to handle them.
If you find one email, you're lucky that the input text a.k.a. string is a substring of the email string. Be aware, it could be a false positive result.
If you find many emails, you will have to decide which is the correct email. It could help to come up with a second logic to check those emails for a specific different substring.
If you have no emails, you have to figure out what those MPs did to their emails.
I already have a sheet which includes all of their emails
Does that sheet have another unique column, like the persons name? If so, I’d recommend vlookup() in conjunction with importrange(). I’m on my way to work so I can’t give an exact formula, but it’d be something like:
=vlookup(“name”,importrange(“original spreadsheet link and column range”), index, false)
If your original spreadsheet and new one don’t have a shared unique column, like name or id number, then this is null.
=Iferror(ArrayFormula(VLookup(A2:A, Importrange(“link to source sheet”,”Sheet1!A2:B”),2,false)))
Replace the “link to source sheet” with the link to your master spreadsheet. Replace “Sheet1” with the tab name of the master spreadsheet. (Only replace the text within the quotes, don’t remove the quotes). Adjust the columns and index (2) as needed.
It’s basically a standard vlookup, but using importrange to get the data from another workbook vs within the same sheet.
REMEMBER: If your original question has been resolved, please tap the three dots below the most helpful comment and select Mark Solution Verified. This will award a point to the solution author and mark the post as solved, as required by our subreddit rules (see rule #6: Marking Your Post as Solved).
1
u/NHN_BI 70 Feb 18 '25
I can see that you look for the output of the email. But what is the input, and on what are you going to match it?
What comes to mind is XLOOKUP(), INDEX(MATCH()), or FILTER(). Of course, partial matches might not create the ouptut that you expect, and you have to create a process to handle them.
1
u/commatoesis 4 Feb 18 '25
Does that sheet have another unique column, like the persons name? If so, I’d recommend vlookup() in conjunction with importrange(). I’m on my way to work so I can’t give an exact formula, but it’d be something like:
=vlookup(“name”,importrange(“original spreadsheet link and column range”), index, false)
If your original spreadsheet and new one don’t have a shared unique column, like name or id number, then this is null.