Splitting Hyphenated Phone Numbers in Excel Using Formulas

📅 Aug 07, 2026 📝 Sarah Miller

Managing inconsistently formatted contact lists is a tedious, error-prone hurdle for busy database administrators. While maintaining clean records is vital when preparing investor outreach to secure standard funding sources-such as venture capital or traditional bank loans-manual data cleaning is highly inefficient. Utilizing targeted Excel formulas grants instant, automated precision to your pipeline. Note the educational stipulation that your source data must maintain a consistent character length (such as standard ten-digit numbers like 555-123-4567) for formulas to parse accurately. Below, we outline the exact steps and functions needed to seamlessly isolate your area codes and phone segments.

Splitting Hyphenated Phone Numbers in Excel Using Formulas

Managing contact lists in Excel is a standard task for marketers, database administrators, and sales professionals. Often, telephone numbers are imported in formatted strings containing hyphens-such as 123-456-7890 or +1-555-0199. While this formatting makes numbers easy for humans to read, it can complicate data analysis, CRM imports, and system integrations that require raw digits, separate area codes, or distinct country codes.

Splitting these phone numbers into separate columns is the ideal solution. Depending on your version of Excel, there are several ways to accomplish this, ranging from the modern, dynamic TEXTSPLIT function to classic string-manipulation formulas like LEFT, MID, RIGHT, and FIND. This comprehensive guide walks you through the best Excel formulas to split phone numbers with hyphens, regardless of your Excel version.

Understanding the Structure of Hyphenated Phone Numbers

Before writing formulas, let's look at the standard structures of hyphenated phone numbers. In North America, the typical structure is AAA-PPP-LLLL, where:

  • AAA: Area Code (3 digits)
  • PPP: Prefix/Exchange Code (3 digits)
  • LLLL: Line Number (4 digits)

Sometimes, international formats add a country code prefix (e.g., 1-AAA-PPP-LLLL or +44-20-7946-0192). A robust formula solution must handle these variations or target specific parts of the string accurately.


Method 1: The Modern & Easiest Way – TEXTSPLIT (Excel 365 & 2021)

If you are using Microsoft 365 or Excel 2021, the absolute easiest and most dynamic way to split phone numbers by hyphens is using the TEXTSPLIT function. This function automatically splits a text string across adjacent columns based on a specified delimiter.

The Formula Syntax

=TEXTSPLIT(text, col_delimiter, [row_delimiter], [ignore_empty], [match_mode], [pad_with])

Step-by-Step Implementation

Assuming your phone number is in cell A2 (e.g., 555-867-5309), enter the following formula in cell B2:

=TEXTSPLIT(A2, "-")

Once you press Enter, Excel will dynamically "spill" the results into cells B2, C2, and D2:

  • B2 will display the area code: 555
  • C2 will display the prefix: 867
  • D2 will display the line number: 5309

Handling Variable Number of Hyphens

One of the greatest benefits of TEXTSPLIT is its adaptability. If some phone numbers have country codes (e.g., 1-555-867-5309) and others do not, TEXTSPLIT automatically handles the varying number of columns without throwing errors or truncating data.


Method 2: Classic Formulas – LEFT, MID, RIGHT, and FIND (Excel 2019 and Older)

If you are working on an older version of Excel, or if you need to build formulas that must be backward-compatible with legacy spreadsheets, you will need to combine traditional text functions. This approach extracts each segment of the phone number individually.

Let's assume your source phone number is in cell A2 (e.g., 123-456-7890).

1. Extracting the Area Code (First Part)

To extract everything before the first hyphen, we use the LEFT function combined with FIND. The FIND function locates the position of the first hyphen, and LEFT grabs all characters up to that position minus one.

=LEFT(A2, FIND("-", A2) - 1)

How it works: FIND("-", "123-456-7890") returns 4. Subtracting 1 gives us 3. LEFT(A2, 3) returns 123.

2. Extracting the Prefix (Middle Part)

Extracting the middle part is trickier because we must find the position of the first hyphen, find the position of the second hyphen, and calculate the length of the text between them using MID.

=MID(A2, FIND("-", A2) + 1, FIND("-", A2, FIND("-", A2) + 1) - FIND("-", A2) - 1)

How it works:

  • FIND("-", A2) + 1 tells Excel to start extracting starting at character position 5 (right after the first hyphen).
  • FIND("-", A2, FIND("-", A2) + 1) locates the second hyphen by starting its search after the first hyphen (at position 5), which returns 8.
  • Subtracting the first hyphen's position (4) and subtracting an additional 1 gives us the length of the middle string (8 - 4 - 1 = 3).
  • The MID function extracts 3 characters starting at position 5, resulting in 456.

3. Extracting the Line Number (Last Part)

To get the final part of the phone number, we use the RIGHT function. We calculate total string length with LEN and subtract the position of the second hyphen.

=RIGHT(A2, LEN(A2) - FIND("-", A2, FIND("-", A2) + 1))

How it works: LEN(A2) returns 12. The second hyphen is located at position 8. Subtracting 8 from 12 leaves 4. RIGHT(A2, 4) grabs the 4 characters from the far-right end of the cell: 7890.


Method 3: The Flexible Space-Substitution Formula

If nested FIND formulas make your head spin, there is a clever alternative formula trick. It substitutes all hyphens with large spaces, uses MID to carve out chunked portions of the string, and cleans up the excess spaces using the TRIM function.

This method is highly robust and can extract any "nth" segment of a hyphen-separated list.

Formula for Segment 1 (Area Code):

=TRIM(MID(SUBSTITUTE($A2, "-", REPT(" ", LEN($A2))), (1-1)*LEN($A2)+1, LEN($A2)))

Formula for Segment 2 (Prefix):

=TRIM(MID(SUBSTITUTE($A2, "-", REPT(" ", LEN($A2))), (2-1)*LEN($A2)+1, LEN($A2)))

Formula for Segment 3 (Line Number):

=TRIM(MID(SUBSTITUTE($A2, "-", REPT(" ", LEN($A2))), (3-1)*LEN($A2)+1, LEN($A2)))

Why this works: The SUBSTITUTE function replaces every single hyphen with a long string of spaces equal to the length of the entire cell. This creates massive gaps of space between each number segment. The MID function then steps in at calculated mathematical increments to grab a chunk of text, and TRIM discards all the filler spaces, leaving only the pure digits.


Handling Edge Cases and Formatting Anomalies

Data in the real world is rarely perfectly formatted. Let's look at how to tackle common anomalies when splitting your phone number columns.

1. Inconsistent Spaces Around Hyphens

Sometimes, users input data with accidental spaces, such as 123 - 456 - 7890. Before applying your split formulas, you should wrap your cell references in the TRIM and SUBSTITUTE functions to clean them up first, or clean the data in-line:

=TEXTSPLIT(SUBSTITUTE(A2, " ", ""), "-")

This helper formula removes all spaces before TEXTSPLIT executes, ensuring your final columns don't contain unwanted leading or trailing spaces.

2. Keeping Leading Zeros

If your area codes or prefixes start with a zero (e.g., 012-345-6789), Excel may automatically convert the split text segments into numbers and delete the leading zero, leaving you with 12. To prevent this, ensure your destination columns are pre-formatted as Text, or use the TEXT function to enforce a text-only split format.


Alternative: Flash Fill (The Non-Formula Way)

If you only need to split your phone numbers as a one-off task and do not require dynamic formulas that update when the source data changes, Excel's built-in Flash Fill is an incredible, zero-formula time saver.

  1. Create three new columns next to your phone numbers and label them: Area Code, Prefix, and Line Number.
  2. In the first data row under Area Code, manually type the area code of your first phone number (e.g., type 123 if the source cell is 123-456-7890). Press Enter.
  3. Move to the next cell down, and press Ctrl + E (the shortcut for Flash Fill). Excel will analyze your manual input, detect the pattern from the adjacent column, and automatically fill the rest of the column.
  4. Repeat this exact process for the Prefix and Line Number columns.

Summary of Methods

Method Excel Compatibility Complexity Best Used For
TEXTSPLIT Office 365 / Excel 2021+ Very Low Quick, dynamic split across columns. Highly recommended if your version supports it.
LEFT / MID / RIGHT / FIND All Excel Versions High Legacy worksheets, backward compatibility, and structured data with strict standards.
TRIM / MID / SUBSTITUTE All Excel Versions Medium-High Strings with highly unpredictable numbers of hyphens or delimiters.
Flash Fill Excel 2013+ None (Manual) Quick, one-time data cleaning without maintaining links to the source.

Choosing the right approach depends on your Excel setup. If you are on the modern version of Office, stick with TEXTSPLIT to save time and streamline your workflow. If you are maintaining sheets meant for users with older versions of Excel, using classic LEFT, MID, and RIGHT formulas ensures universal functionality.

Disclaimer:
The documents and templates provided on this page are for informational and illustrative purposes only. They do not constitute professional, legal, or financial advice, and should not be relied upon as such. Because individual circumstances and regulatory requirements vary, these materials may not be suitable for your specific needs. We recommend consulting with a qualified professional before adapting or using any of these examples for official or commercial purposes.