Microsoft Excel is one of the most widely used but complex spreadsheet programs.
For sales professionals especially, it is challenging to work with - but sometimes we have no choice but to use it.
Knowing the right formulas will make Excel an incredibly powerful tool for cleaning and organizing your sales data.
In this article, I'll show you 3 Excel formulas to deal with your sales data.
These three Excel formulas will help you:
- Extract domain names from email addresses.
- Clean and format phone numbers fast.
- Clean company names from legal suffixes and capitalize them properly.
They will not only save you hours of manual work but also help you maintain clean, consistent CRM data - without needing to be an Excel expert.
I have also included alternatives that let you achieve the same result with just a few clicks.
How to Extract Domain Names from Email Addresses
In Excel there are 2 ways to extract the the domains from a list of email addresses, let me explain:
The first way: TEXTAFTER
function – Only available on the new Excel version or Excel for web.
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:
- Enter the formula
=TEXTAFTER
in your formula field - Select the cell containing your first email address (e.g., B3)
- Add
@
as the search text
Your Excel formula will look like this:
=TEXTAFTER(B3,"@")
And to apply this to all of your emails, drag the corner on the bottom right of your cell with the original formula.
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.
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.
👉 Simpler Solution! Use Datablist’s to extract domain names from email addresses. (You don’t have and shouldn’t be dealing with complex formulas because your time is valuable)
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("",1,TEXTSPLIT(B3,{"(",")","-"," ","."},,1))+0
This formula will allow us to remove all the redundant special characters and spaces in the phone number to prepare it for our next step, which is to format those phone numbers in one unified format.
Here's how it looks when this formula is applied.
Apply this formula to all your phone numbers by dragging the bottom-right corner of the original cell down, as shown below.
Now for the second step:
Create a new column and name it: 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.
Select "Phone Numbers" and the country of your phone numbers
Excel Fact: Even though Excel has formatting options for many countries, most of them don't work. So technically, this formula is limited to US phone numbers only. If you want to clean phone numbers from other countries, check out Datablist's phone number formatter.
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.
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.
This formula will be very simple and contain only the position of the cleaned phone numbers — in my case, this will be “D3”
Once you've typed the formula, click "ENTER" to apply it.
If you've done everything correctly, your result should look like this:
Now drag down the bottom right corner to apply the formatting to all your phone numbers in Excel, as shown below:
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.
To remove all suffixes and clean a list of company names, use this formula:
=TRIM(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(LOWER(B4), " inc.", ""), " inc", ""), " llc", ""), " ltd.", ""), " ltd", ""), " corporation", ""), " corp.", ""), " corp", ""), " company", ""), " incorporated", ""), " co", ""), " co.", ""), " gmbh", ""), " s.a.", ""), " s.a", ""), " pty ltd", ""), " plc", ""), " plc.", ""))
Explanation of this formula:
LOWER(B4)
makes the text case-insensitive.SUBSTITUTE(..., " llc", "")
removes the suffixes (with a space).TRIM(...)
removes any extra spaces left behind.
This is how it looks when the company name cleaning formula is applied:
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:
But there's still one thing: The company names aren't capitalized.
To fix this, we'll use this Excel formula “=PROPER(D4)” and click “ENTER”.
This is how it looks when it’s done correctly:
Finally, drag the bottom right corner down to apply the formula to your entire list of company names.
Don’t want to use complex formulas that do just half the job? I wouldn’t want this either. That’s why I always use AI for this. Learn how to do clean company names with AI.
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?
This requires a two-step process: First, clean the numbers using the TEXTJOIN
/TEXTSPLIT
formula to remove special characters, then format them using Excel's built-in phone number formatting for a consistent appearance.
Can I use Excel to format phone numbers for countries other than the US?
While Excel has formatting options for multiple countries, most don't work effectively. For non-US phone numbers, use Datablist's phone number formatter which works for 190+ countries.
How can I remove company suffixes like LLC, Inc., and Ltd. from company names in Excel?
The guide provides a comprehensive formula using multiple SUBSTITUTE
functions to remove common company suffixes. It also includes steps to properly capitalize the cleaned company names using the PROPER
function.
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 you can also use the web version of Excel which has always all new and old functions.