Extract Email Address from Cell with Multiple Data

mblackok

New Member
Joined
Jul 25, 2023
Messages
5
Office Version
  1. 365
Platform
  1. Windows
I am exporting a file of data and need to extract the work email address from each cell that contains user details including personal email address. This action will need to be completed each day and I am wondering if there is a formula that will ignore the "personal email" field and extract only the "email" field needed?
 

Attachments

  • Extract Email.png
    Extract Email.png
    31.2 KB · Views: 31

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
When a Email (Not Personal Email) is found what should be done with it?

How are you “extracting” these email addresses? On a case-by-case basis or do you want an entire sheet or selected range tested and extract emails.

A little more clarification would be helpful.

If multiple email addresses are “extracted” the code will have to be a Macro (VBA Sub) and executed from the View menu, a button on the sheet, …
 
Upvote 0
Hi & welcome to MrExcel.
It's very difficult to tell what is in the cell from an image, but try
Excel Formula:
=TEXTBEFORE(TEXTAFTER(D2,"Email: ",-1)," ")
 
Upvote 0
Sorry about that. I tried to use the plugin but I wasn't able to get it to work. The formula you provided is so close! The desired email was extracted but the results included the word Department with a colon after.

ddi@collegeprep.org
Department:
 
Upvote 0
When a Email (Not Personal Email) is found what should be done with it?

How are you “extracting” these email addresses? On a case-by-case basis or do you want an entire sheet or selected range tested and extract emails.

A little more clarification would be helpful.

If multiple email addresses are “extracted” the code will have to be a Macro (VBA Sub) and executed from the View menu, a button on the sheet, …
The daily project I will manage includes two files of accounts that need to be created and accounts that have been created. These files are exported from two different programs and the unique identifier is the "Email:" address. So, I am thinking I need to extract the "Email:" from the cell so that I can use VLookup to identify which accounts have been created and which have not. The only email address I need is the "Email:" address as the "Personal Email:" address would return a null value and likely falsely indicate an account has not been created.
I am definitely open to suggestions! Thank you for taking a look!
 
Upvote 0
One quick idea based on the limited information.
T202307a.xlsm
DEF
1
2Personal Email: ddi@xxxxcollege.orgDepartment 123ddi@xxxxcollege.orgDepartment
3Personal Email: ddi@xxxxcollege.orgDepartment 123ddi@xxxxcollege.org
4
1f
Cell Formulas
RangeFormula
E2E2=TEXTBEFORE(TEXTAFTER(D2,"Email: ",-1)," ")
E3E3=LET(x,TEXTAFTER(D3,"Email: ",-1),LEFT(x,FIND(".",x,1)+3))
 
Upvote 0
How about
Excel Formula:
=TEXTBEFORE(TEXTAFTER(D2,"Email: ",-1),CHAR(10))
 
Upvote 0
Solution
How about
Excel Formula:
=TEXTBEFORE(TEXTAFTER(D2,"Email: ",-1),CHAR(10))
This worked beautifully! I pulled the entire report and used this formula and it worked for multiple domain email addresses. Thank you so much!
 
Upvote 0
@Fluff @Dave Patton @Bosquedeguate Thank you so much for taking the time to read my question and try to help. I was able to complete the task at hand and know that as I run these daily reports, the formula =LET(x,TEXTAFTER(D3,"Email: ",-1),LEFT(x,FIND(".",x,1)+3)) will be such a time saver than text to cell and then search or concatenate back etc. Thank you, thank you, thank you!!!
 
Upvote 0
Glad we could help & thanks for the feedback.
Note that the formula in post#9 will not work for domains that have multiple . such as .co.uk
 
Upvote 0

Forum statistics

Threads
1,215,097
Messages
6,123,077
Members
449,094
Latest member
mystic19

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top