Written by Allen Wyatt (last updated April 16, 2022)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, 2021, and Excel in Microsoft 365
Do you have a worksheet that has a bunch of e-mail addresses in it, as a series of hyperlinks? If so, you may be interested in a way to pull out those addresses and put them into cells as plain text. There are a few ways you can perform this task.
The first method is to remember that the hyperlinks for e-mail addresses all start with the text "mailto" followed by a colon. Thus, you can use a formula that will strip out the first part of the hyperlink. For instance, if the e-mail hyperlink is in cell A1, you can use this formula:
=RIGHT(A1,LEN(A1)-7)
This checks the length of the cell contents, and then extracts all of it except the first seven characters, which is the "mailto:" portion. You could also use a formula that relies on the SUBSTITUTE function:
=SUBSTITUTE(A1,"mailto:","")
If you prefer, you can use a macro to do the conversion from hyperlink to text-only e-mail address. The following single-line macro is a user-defined function that returns the converted hyperlink:
Function ExtractEmailAddress(rCell As Range) ExtractEmailAddress = _ Mid(rCell.Hyperlinks(1).Address, 8) End Function
In order to use the macro, all you need to do is use the function in some cell of your worksheet, in this manner:
=ExtractEmailAddress(A1)
Note:
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (12000) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, 2021, and Excel in Microsoft 365. You can find a version of this tip for the older menu interface of Excel here: Extracting E-mail Addresses from Hyperlinks.
Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!
When creating an e-mail address hyperlink using the Insert Hyperlink dialog box, Excel allows you to enter a subject for ...
Discover MoreIf you open workbooks in two instances of Excel, you can use drag-and-drop techniques to create hyperlinks from one ...
Discover MoreGot a single worksheet that you want to e-mail to someone, but don't want them to see the rest of the worksheets in the ...
Discover MoreFREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)
Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2025 Sharon Parq Associates, Inc.
Comments