Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn Advanced Formula Combinations | Scenario Modeling and Interactive Decision Systems
Excel Formulas

Advanced Formula Combinations

Swipe to show menu

Many real-world datasets contain multiple pieces of information inside a single text field. In this chapter, combine text functions to extract structured information dynamically from email addresses.

LEN Structure

=LEN(text)

text: evaluated string.

LEN returns the total number of characters in a string.

FIND Structure

=FIND(find_text, within_text, [start_num])
  • find_text: character or text being searched;
  • within_text: evaluated string;
  • [start_num]: optional starting position.

FIND returns the position of a character inside a string.

LEFT Structure

=LEFT(text, num_chars)
  • text: evaluated string;
  • num_chars: number of characters extracted from the left side.

MID Structure

=MID(text, start_num, num_chars)
  • text: evaluated string;
  • start_num: extraction starting position;
  • num_chars: number of characters extracted.
Step 1 Open the Customers_Clean Sheet
expand arrow

Move to:

Customers_Clean

The email data has already been standardized using SUBSTITUTE.

Step 2 Create the Extraction Columns
expand arrow

Add the following columns:

Email_Username
Email_Domain
Email_Valid
Step 3 Locate the @ Symbol
expand arrow

Type:

=FIND("@", Customers_Clean[@Email_Clean])

The formula returns the position of the @ delimiter.

Step 4 Extract the Email Username
expand arrow

Type:

=LEFT([@[Email_Clean]], FIND("@", [@[Email_Clean]]) - 1)
  • FIND(...) - 1: identifies the last character before @;
  • LEFT(...): extracts the username portion.
Step 5 Extract the Email Domain
expand arrow

Type:

=MID([@[Email_Clean]], FIND("@", [@[Email_Clean]]) + 1, LEN([@[Email_Clean]]) - FIND("@", [@[Email_Clean]]))
  • FIND(...) + 1: starts extraction after @;
  • LEN(...) - FIND(...): calculates remaining character count.

The formula dynamically extracts domains regardless of length.

Step 6 Test Dynamic Parsing
expand arrow

Modify several email addresses with:

  • Different username lengths;
  • Different domain lengths;
  • Different domain providers.

Confirm that the extraction formulas continue working dynamically.

1. What is the main reason LEN is used in text extraction formulas like MID?

2. Why is FIND preferred over manual positioning when extracting parts of an email?

3. In the email domain extraction formula, what is the role of LEN - FIND("@", …)?

question mark

What is the main reason LEN is used in text extraction formulas like MID?

Select the correct answer

question mark

Why is FIND preferred over manual positioning when extracting parts of an email?

Select the correct answer

question mark

In the email domain extraction formula, what is the role of LEN - FIND("@", …)?

Select the correct answer

Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 5. Chapter 4

Ask AI

expand

Ask AI

ChatGPT

Ask anything or try one of the suggested questions to begin our chat

Section 5. Chapter 4
some-alt