Extracting E-mail Addresses from Hyperlinks in Excel
There are a few ways to extract e-mail addresses from hyperlinks in Excel. One way is to use a simple macro. Another way is to use a more sophisticated method that involves using regular expressions. And yet another way is to use a third-party tool such as the Email Address Extractor.
Method 1: Use a Macro
Using a macro is the simplest way to extract e-mail addresses from hyperlinks in Excel. To do this, follow these steps:
Open the workbook that contains the hyperlinks from which you want to extract e-mail addresses.
Press Alt+F11 to open the Visual Basic Editor.
In the Project Explorer window, double-click on ThisWorkbook.
Click Insert > Module, and then paste the following code into the module:
Dim cell As Range
For Each cell In Selection
If cell.Hyperlinks.Count > 0 Then
cell.Value = cell.Hyperlinks(1).Address
Press F5, or click Run Sub/UserForm on the toolbar, to run the macro.
Get started with Causal today. Build models effortlessly, connect them directly to your data, and share them with interactive dashboards and beautiful visuals.