Excel Formula to Extract Email Address from Text

IntermediateText Manipulation

I have a cell containing text and an email address (e.g., 'Contact john@example.com for info'). I want to extract just the email.

The Formula

=TEXTBEFORE(TEXTAFTER(A1, " "), " ")

How It Works

1

TEXTAFTER finds the space before the email address.

2

TEXTBEFORE stops extracting at the space after the email address.

3

Note: This assumes the email is surrounded by spaces. For more complex extraction, Regex is needed.

💡 Pro Tips

  • • Test the formula with sample data before applying to your entire dataset
  • • Use absolute references ($A$1) when copying formulas to prevent reference errors
  • • Consider error handling with IFERROR() for more robust formulas
  • • Document your formulas with comments for future reference

Need a Custom Formula?

Can't find exactly what you need? Our AI can generate custom Excel formulas based on your specific requirements.

Try AI Generator

Formula Details

Difficulty:Intermediate
Category:Text Manipulation
Steps:3