Black Friday30% off Datablist. This week only.
Ends in
--Days--Hours--Minutes--Seconds
Get 30% off

Top 3 Excel Formulas to Clean Sales Data

Habib Benabdeslam
Habib Benabdeslam
10 min read
Excel Formulas to Clean Sales Data
Top 3 Excel Formulas to Clean Sales Data
Table of contents
  1. How to Extract Domain Names from Email Addresses
    1. Extracting the Domain from an Email on the Old Excel Version
    2. Review email exceptions before filling down
    3. Cleaning and Formatting Phone Numbers
    4. Cleaning Company Names
  2. FAQ

Use these Excel formulas to clean sales data when you need email domains, consistent phone text and reviewed company names before a CRM import. Keep the original columns and write each result into a new column so you can inspect what changed.

I start with a few awkward rows: a phone number beginning with zero, a missing email separator and a company name containing a word that resembles a legal suffix. A formula that works on the first tidy row can damage these cases when copied down.

This guide covers three tasks:

📌 Summary For Those In a Rush

Prepare sales columns for a checked CRM import with three focused Excel transformations. Keep source values beside the results, then review exceptions before replacing anything.

  • Input: Email addresses, phone text and company names.
  • Output: Extracted domains, phone text with selected punctuation removed and company names cleaned under an explicit suffix rule.

How to Extract Domain Names from Email Addresses

In Excel there are two ways to extract domains from a list of email addresses, let me explain:

The first way: TEXTAFTER function, available in Microsoft 365, Excel for the web and Excel 2024. Check Microsoft's current function documentation for your edition.

Second way: A combination of RIGHT, LEN, and FIND functions – For everyone who can’t use the “TEXTAFTER” version.

To extract the domain name from an email address, follow these steps:

  1. Enter the formula =TEXTAFTER in your formula field
  2. Select the cell containing your first email address (e.g., B3)
  3. Add @ as the search text

Your Excel formula will look like this:

=TEXTAFTER(B3,"@")
Extracted domain from an email
Extracted domain from an email

And to apply this to all of your emails, drag the corner on the bottom right of your cell with the original formula.

Extracted domains of an email list
Extracted domains of an email list

Extracting the Domain from an Email on the Old Excel Version

Now I will show you how you can extract the domain name from emails with an older version of Excel that doesn't support the "TEXTAFTER" function.

The formula we will use is =RIGHT(B3,LEN(B3)-FIND("@",B3))

To use this formula, paste it into the formula field and apply it to the cell containing your first email address.

First domain extracted with the =RIGHT(B3,LEN(B3)-FIND("@",B3)) formula
First domain extracted with the =RIGHT(B3,LEN(B3)-FIND("@",B3)) formula

Here's how this formula works: It uses the RIGHT function to grab characters from the end of your email, while FIND and LEN work together to figure out exactly how many characters to extract.

Let's use john.doe123@abc.com as an example — it has 19 characters total:

LEN(B3) gives us 19 characters.

FIND looks for the @ symbol in john.doe123@abc.com and tells us it's the 12th character:

FIND("@",B3) gives us 12.

We subtract 12 from 19, and that 7 goes straight to the RIGHT function. This tells Excel to grab those last 7 characters, giving us abc.com as the final result.

To apply this formula to all your cells, drag the bottom right corner of the cell containing the original formula downward.

=RIGHT(B3,LEN(B3)-FIND("@",B3)) formula applied to extract all the domain names of my email list.
=RIGHT(B3,LEN(B3)-FIND("@",B3)) formula applied to extract all the domain names of my email list.

If you prefer a CSV workflow, extract domains in Datablist and review the output beside the source column.

Review email exceptions before filling down

TEXTAFTER(B3,"@") returns an error when the separator is absent. An illustrative review formula is =IFERROR(LOWER(TRIM(TEXTAFTER(B3,"@"))),"Review email"). It extracts text; it does not verify that the address exists or is deliverable. Reject rows containing several addresses or several @ characters rather than treating the extracted tail as a trusted company domain.

For example, alex@example.com gives example.com, while alex.example.com needs review. Keep the full email alongside the domain so two people at one company are not accidentally merged as one contact.

Cleaning and Formatting Phone Numbers

Now we will clean and format phone numbers in two steps.

The first step is to clean the phone numbers using this formula:

=TEXTJOIN("",TRUE,TEXTSPLIT(B3,{"(",")","-"," ","."},,TRUE))

This removes only the listed punctuation and returns text. Do not add +0 or otherwise coerce the result into a number: that removes leading zeroes and the international + sign. Import the original phone column as text too; a formula cannot recover zeroes Excel already discarded. Microsoft explains this behavior in its leading-zero guide.

TEXTSPLIT requires a supported Excel edition. This example uses English function names and comma argument separators; a localized installation may use different names or separators. It does not validate country codes, extensions or reachable numbers.

Here's how it looks when this formula is applied.

Cleaned phone number
Cleaned phone number

Apply this formula to all your phone numbers by dragging the bottom-right corner of the original cell down, as shown below.

Cleaning formula applied to all my phone numbers
Cleaning formula applied to all my phone numbers

For example, the text 020 7946 0958 becomes 02079460958; +44 (20) 7946-0958 becomes +442079460958. Preserve extensions separately and flag letters or unexpected characters for review. A phone number is an identifier, not a quantity to calculate.

The following screenshots illustrate an optional US display format. Use this only for reviewed ten-digit US numbers in a separate display column. Keep the cleaned text for international exports and CRM imports; this display step is not international normalization.

Create a separate column named Formatted Phone Numbers.

My new column to insert the formatted phone numbers
My new column to insert the formatted phone numbers

Choose the cell under your header and use the Excel shortcut "Command" + "1" to open all formatting options.

Select "Special" as the formatting option.

Formatting options in Excel
Formatting options in Excel

Select "Phone Numbers" and the country of your phone numbers

choosing_the_option_to_format_numbers_into_us_phone_numbers.png
choosing_the_option_to_format_numbers_into_us_phone_numbers.png

💡 Excel number formats change how numeric cells look. They do not supply a missing country code or validate a phone number. For an international list, keep the text values and review country information before choosing a dedicated phone-cleaning workflow.

Now you should close the drawer and verify if Excel applied the format.

To do this, you can simply check if the column is displaying "Special" in the format field. I highlighted this in the picture below.

Formatted Excel column to format US phone numbers
Formatted Excel column to format US phone numbers

The last step is to type a formula in that column that takes the phone numbers we just cleaned into the new column that we optimized for US phone numbers.

For the reviewed US-only display example, =VALUE(D3) supplies a numeric value to the display column. Keep D3 unchanged as text. A reference such as =D3 alone remains text and will not gain a numeric phone display format.

Simple formula to insert phone numbers into new column
Simple formula to insert phone numbers into new column

Once you've typed the formula, click "ENTER" to apply it.

If you've done everything correctly, your result should look like this:

Formatted US. phone number in Excel
Formatted US. phone number in Excel

Now drag down the bottom right corner to apply the formatting to all your phone numbers in Excel, as shown below:

All phone numbers formatted in US. format
All phone numbers formatted in US. format

Cleaning Company Names

Cleaning company names might be one of the most important things you should do before you start outreaching to potential clients, that's why I didn't want to miss this in my guide.

Use a suffix rule you can explain. SUBSTITUTE replaces matching text wherever it occurs. For example, =SUBSTITUTE("Acme Consulting"," Co","") returns Acmensulting, deleting part of the real name. Matching is case-sensitive: using " co" instead leaves Acme Consulting unchanged unless you lowercase the source first. A chain of substitutions also depends on replacement order. I would not apply that broad substitution chain to a CRM column.

For a list where the approved rule is remove a final space followed by LLC, use:

=IF(RIGHT(TRIM(B4),4)=" LLC",TRIM(LEFT(TRIM(B4),LEN(TRIM(B4))-4)),TRIM(B4))

This is deliberately narrow. Acme LLC becomes Acme, while Acme LLC Services and Acme Consulting remain unchanged. It does not cover L.L.C., every legal form or every country. Add separately reviewed rules when your data needs them.

The existing screenshots below show the older broad-substitution example. Use the explicit rule above for the final output and compare the original name before accepting a change.

Formula to lowercase all company names and delete suffixes
Formula to lowercase all company names and delete suffixes

How the narrower formula works: TRIM removes ordinary surrounding spaces, RIGHT checks the final four characters, and LEFT removes only that checked ending. The comparison is case-insensitive in ordinary Excel formulas. Do not assume TRIM removes every Unicode spacing character.

This is how it looks when the company name cleaning formula is applied:

Applied company name cleaning formula
Applied company name cleaning formula

And don't forget to drag down the bottom right corner of the cell with the original formula to apply this to all your company names as shown here:

Applying the formula to clean company names across the entire list
Applying the formula to clean company names across the entire list

But there's still one thing: The company names aren't capitalized.

Use =PROPER(D4) only when title case is the intended output. It changes IBM to Ibm, so keep official brand casing or add explicit exceptions when that matters. The screenshots demonstrate the transformation, not a guarantee of the correct trading name.

Formula that capitalizes the company names as proper nouns
Formula that capitalizes the company names as proper nouns

This is how it looks when it’s done correctly:

Applied formula to capitalize the company names
Applied formula to capitalize the company names

Finally, drag the bottom right corner down to apply the formula to your entire list of company names.

Applied formula to all company names
Applied formula to all company names

If you already have a list of approved old and new names, follow the multiple-value replacement workflow to apply those mappings.

When a company has changed its name, verify its identity with a registry number before adding the old and new names to your replacement list.

For more varied names, the AI company-name cleaning guide shows an alternative. Keep original values and review legal suffixes, acronyms and ambiguous cases whichever method you choose.

Frequently Asked Questions

How do I extract domain names from email addresses in Excel?

You can use either the TEXTAFTER function in newer Excel versions or the RIGHT/LEN/FIND combination in older versions.

What's the best way to clean up messy phone numbers in Excel?

Keep phone inputs as text, remove only the punctuation you intend and inspect leading zeroes, country codes and extensions. Numeric display formatting is an optional, separate US-only example, not validation or international normalization.

Can I use Excel to format phone numbers for countries other than the US?

Do not apply the US display example to a mixed-country list. Keep the original text and country information, then choose explicit international normalization rules or a suitable phone-processing tool. Formatting alone does not establish validity.

How can I remove company suffixes like LLC, Inc., and Ltd. from company names in Excel?

Start with a reviewed final-suffix rule, such as removing a final LLC. Avoid unrestricted substring replacements inside names. Treat capitalization as a separate decision because PROPER changes acronyms and brand casing.

What to do if my Excel version doesn't have the TEXTAFTER function?

You can use alternative formulas for older Excel versions. For example the combination of RIGHT, LEN, and FIND functions or check whether your current Excel edition supports TEXTAFTER.