Extract Email Addresses From Text
Pull every email address out of messy free-form text into a clean adjacent column
What it does
You have a column of free-form text. Meeting notes, customer comments, support tickets, sales-rep notes, anything with prose that occasionally drops in an email address. The macro scans each cell, finds every email-shaped substring (local-part@domain.tld), and writes the matches comma-separated into the column to the right. Works on Mac Excel and Windows Excel both — no VBScript.RegExp dependency, just a hand-rolled scanner that walks each @ outward to find the surrounding email. Sentences ending in an email get handled correctly (the trailing period gets trimmed).
Real-world example
Picture a sales operations analyst at a B2B SaaS company. Every Friday she pulls a CSV out of the team's note-taking app to feed updates into the CRM. The notes column is unstructured prose: things like "Spoke with Priya at Acme today, she's the new VP, send the deck to priya.s@acme.io and cc her assistant at jordan@acme.io." About a third of notes mention an email; some mention two or three. None of them are in their own column.
Her current workflow is awful. She opens the CSV in Excel, sorts by note length descending, then walks down the list eyeballing each note for @ symbols. She copies each email she sees into column G one row at a time. On a 600-row weekly export this takes 45 to 60 minutes of mind-numbing copy-paste, and she misses about 5% of the emails because they're embedded inside long paragraphs.
With this macro she selects the notes column, runs the tool, and the macro extracts all 287 emails it finds across the 600 notes into column G in about 3 seconds. Multi-email notes come through comma-separated like priya.s@acme.io, jordan@acme.io, which she splits later if needed. The popup at the end tells her how many cells got hit and how many emails were found, which she uses as a quick sanity check (if the count seems off, she scrolls a section of the source column to spot-check).
On a typical 600-row weekly notes export, expect about 50 minutes saved per pass. Across a year that's around 40 hours she gets back, plus the embarrassment-saving win of catching the emails she'd otherwise have missed.
How to use
First time? See How to run our tools for the 30-second setup.
- Make sure the column to the right of your text column is empty. The macro writes results there.
- Select the column or range of cells containing the text to scan.
- Press Alt + F8 (Windows) or Option + F8 (Mac), pick
ExtractEmailsFromText, click Run. - The macro writes any emails found to the cell directly to the right of each source cell, comma-separated when there's more than one. The popup reports total emails found and how many cells contained at least one.
FAQ
What counts as a valid email?
The pattern looks for local-part@domain.tld where the local part contains letters, digits, dots, underscores, hyphens, plus signs, or percent signs, and the domain has at least one dot with a TLD of two or more letters. So john.doe@acme.io, support+billing@example.co.uk, and r_smith@subdomain.example.com all match. Things that look email-ish but aren't (like @handle for a Twitter mention) are rejected because there's no . in the trailing part.
Does it find multiple emails in one cell?
Yes. If a cell contains "Email priya@acme.io and jordan@acme.io about the proposal", both addresses get captured and written comma-separated as priya@acme.io, jordan@acme.io in the adjacent cell. After running the macro, Excel's Text to Columns feature with , as the delimiter splits them apart cleanly if you need them in separate cells.
What if my text mentions an email that ends a sentence with a period?
Handled. The scanner trims trailing dots and hyphens before validating, so "...send to alex@example.com." correctly extracts alex@example.com without the trailing period. Similar trim for trailing dashes covers cases like "alex@example.com-" in a hyphenated phrase.
Why is the result a single string instead of one email per row?
Keeping the row count of the output the same as the input makes the macro safe to run on any column position. If we exploded multi-email cells into multiple rows, we'd shift everything below them and break aligned data in adjacent columns. If you want one email per row, run Text to Columns on the result column with , as the delimiter, then transpose.
Does it work on Mac Excel?
Yes. The macro uses a hand-rolled scanner instead of VBScript.RegExp, which doesn't exist on Mac Excel. It works on Windows Excel 2016+ and Mac Excel for Microsoft 365. Your data never leaves your machine — there are no API calls, no network, nothing fancy. Just a loop that walks each @ it finds.
Can I undo it?
Yes, Ctrl/Cmd + Z right after running. The macro only writes to the column to the right of your selection, so undo cleanly removes the extracted column without touching the source text. As always, work on a copy if the source is the only copy.
Did this tool work for you?
One click. We use this to fix tools that don't work and prioritize what to build next.
Related tools
Add Prefix and Suffix to Cells
Bulk-add text to the start and/or end of every cell in your selection, with formulas left untouched
AutoFit All Columns on All Sheets
Run AutoFit on every column of every visible sheet so the workbook is consistently readable in one click
Bulk Add Hyperlinks
Convert every URL-like cell in your selection into a clickable hyperlink in one pass