Pull Email Address from a cell

LearnVBA83

Board Regular
Joined
Dec 1, 2016
Messages
109
Office Version
  1. 365
Platform
  1. Windows
Hi all,

I have a column in my data called item description that looks like the below data set. What type of formula would you use to pull the email out of this data? I have 25,000 lines and for example below i just want a formula to pull John.Doe@Company.com. This will allow me to pull everyone's email from the data.


1708967740110.png
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Please try this:
=LET(Ary,TEXTSPLIT(K3," ",,TRUE),M,MATCH("*@*",Ary,0),INDEX(Ary,,M))
Where K3 is the cell with the string containing the the email address
 
Upvote 1
Solution
Please try this:
=LET(Ary,TEXTSPLIT(K3," ",,TRUE),M,MATCH("*@*",Ary,0),INDEX(Ary,,M))
Where K3 is the cell with the string containing the the email address
This seems to work well! Can you explain what the Ary is doing?
 
Upvote 0
Another option based on that single sample
Excel Formula:
=TEXTAFTER(A2,"email: ",,1)
 
Upvote 0
The LET function allows you to create variables within the formula. Ary is a variable named by me. It stores the different values returned by TEXTSPLIT.
 
Upvote 0
The next variable M stores the match found by looking for "@". Then finally Index returns the 5th value in the Array using INDEX
 
Upvote 0

Forum statistics

Threads
1,215,200
Messages
6,123,601
Members
449,109
Latest member
Sebas8956

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