• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Excel Tutorials by Y. Acosta

Excel Tutorials + Tips

  • Excel Tutorials
  • Etsy Store
  • Other Resources
  • About Me
    • About Me
    • Contact Me
    • FREE Printable List of Top Excel Keyboard Shortcuts
  • FREE pdf of Top Excel Shortcuts!

Can You Really Hard-Code Phone Numbers in Excel??? (with video tutorial)

❤ Support Free Excel Training by Sharing -

We may be compensated for your purchase of any of the products featured on this page – it helps us keep the lights on :)

Trying to hard-code phone numbers in Excel from a list of phone values that were not correctly formatted can be tricky (if you don’t want to do it manually!).

This is because Excel’s phone number formatting options don’t actually change the contents in the cell, they only make them look like phone numbers.

But what if you need the dashes, parentheses, and whatever other characters you use in your phone formats to be hard-coded into your sheet???

To be honest, I haven’t found a perfect solution to this.

So, in this tutorial, I’m going to share an option that works for me (most of the time!): Flash Fill

NOTE: Flash Fill is available in Excel 2013 and newer.

Use Flash Fill to Hard-Code Phone Values into Excel

Flash Fill works by detecting formatting patterns as you type. Once it detects a pattern, it replicates it in adjacent, consecutive cells.

The Flash Fill results are then all hardcoded into these cells.

NOTE: By “consecutive cells,” I mean that, if there is a blank cell in your list of values, Flash Fill will stop the fill once it comes to the blank cell. It assumes the blank cell is the end of the list.

If you like, you can then copy and paste the new phone values from your Flash Fill into a new file or paste over the original list of values.

Learn About Flash Fill: 3 Ways to Use Flash Fill in Excel with Examples (+ video tutorial)

Limitations of using Flash Fill to hardcode phone values in Excel

No tool is perfect. While Flash Fill works most of the time, there will be times that it’s unable to identify a pattern.

When this happens, you won’t be able to use it for the purpose of hard-coding phone values.

Also, the number of entries before the Flash Fill preview displays can differ from user to user or even between one attempt and another. This is because it also takes into consideration other actions taken.

Let’s look at some examples of how you can use Flash Fill to hardcode phone numbers in Excel.

Ways to Use Flash Fill to Hard-Code Phone Values in Excel

WATCH: How to Hard Code Phone Numbers in Excel by Using Flash Fill – Video Tutorial

Use Flash Fill to Hard-Code Dashes into a List of Phone Numbers (or periods, and spaces too!)

Once Flash Fill has identified a pattern, it will fill the cells next to your list using this pattern.

For example, let’s say you have a list of values in column A and need to generate a list of those values be phone numbers with dashes:

The values in Column A may look like: 1234567890

You need them to be: 123-456-7890

In column B (you need to do this in an adjacent column), you would type the first entry as you want it to look “123-456-7890.”

Once you begin typing the next entry, the Flash Fill preview will display.

If you’re happy with it, press Enter to accept the fill and populate the phone numbers with dashes for you!

FYI: You can also press Ctrl+E from your keyboard after typing the first entry to force the Flash Fill.

Example of Using Flash Fill to Hard-Code Phone Numbers with Dashes in Excel
Example of Using Flash Fill to Hard-Code Phone Numbers with Dashes in Excel

TIP: You can tell that the Flash Fill values are hard-coded by looking in the Formula Bar. If the dashes appear in the formula bar, then they are hard-coded in the cell. If the dashes were merely formatted (and not entered in the cell), you would not be able to see them in the Formula Bar.

You can also use Flash Fill to hard-code phone numbers with periods and spaces too!

Example of Using Flash Fill to Hard-Code Phone Numbers with Periods in Excel
Example of Using Flash Fill to Hard-Code Phone Numbers with Periods in Excel
Example of Using Flash Fill to Hard-Code Phone Numbers with Spaces in Excel
Example of Using Flash Fill to Hard-Code Phone Numbers with Spaces

Hard-Code Phone Numbers with Multiple Formatting Characters

You can also use Flash Fill to create a list of values with phone formats that include multiple characters.

For example, a phone format with parentheses, spaces, and dashes:

The values in Column A may look like: 1234567890

You need them to include parentheses, spaces, and dashes: (123) 456-7890

Example of Using Flash Fill to Hard-Code Phone Numbers with Multiple Formatting Characters in Excel
Example of Using Flash Fill to Hard-Code Phone Numbers with Multiple Formatting Characters

NOTE: When the Flash Fill preview displays can differ from user to user or even between one attempt and another. This is because it also takes into consideration other actions taken.

Use Flash Fill to Create a List of Hard-Coded Phone Numbers from a Non-Consistent List of Values

You can also use Flash Fill when the list of values is not consistent.

Let’s say column A has phone values where some have periods, some have dashes, and others have slashes. In other words, they are all formatted differently.

In this situation, you can still give Flash Fill a try to create a list of values that have hard-coded, consistent phone formats.

As always, make sure to check that the fill you’re accepting is how you want it!

When I worked through this example, the first Flash Fill option that populated was not correct; the first 3 digits were in parentheses, but the remainder all used different characters.

Example of Flash Fill Not Finding the Right Phone Number Pattern
Example of Flash Fill Not Finding the Right Phone Number Pattern Right Away

To try to force the correct Flash Fill, I ignored this and continued typing.

With my next entry, the correct formatting finally appeared!

Example of Needing Multiple Examples for Flash Fill to Detect Pattern When Hard-Coding Phone Numbers in Excel
Example of Needing Multiple Examples for Flash Fill to Detect Pattern When Hard-Coding Phone Numbers in Excel

When Flash Fill Doesn’t Work to Hard-Code Phone Values

As I noted in the intro to this tutorial, Flash Fill works most of the time to hard-code phone values, but not all the time.

For example, I was unsuccessful when I tried to format the phone values to include a +1, parentheses, and a dash.

The Flash Fill that populated was completely wrong. Instead of adding a +1 at the beginning, it attempted to use the first number in the cell.

Not what I wanted.

Example of Flash Fill Not Detecting the Right Phone Number Pattern
Example of Flash Fill Not Detecting the Right Phone Number Pattern

I then manually typed a few more examples and nothing.

I even tried forcing the Flash Fill using the Ctrl+E keyboard shortcut. Doing this gave me an error message that a pattern was not able to be detected.

Example of Flash Fill Unable to Detect Pattern Error Message
Example of Flash Fill Unable to Detect Pattern Error Message

While using Flash Fill to hard-code phone numbers in Excel definitely has its limitations, it does work for most uses. All in all, making it a pretty handy tool for this purpose.

I would love to know how you were able to use Flash Fill to hard-code phone values! Make sure to note in the comments what results you got when you tried this method.

Related: How to Format Phone Numbers in Excel (+ video tutorial)



Next: How to Add Zeros in Front (Leading Zeros) in Excel (+ video tutorial)

FYI, this tutorial was created using the desktop version of Excel in Microsoft 365.


Related Articles:

  • Phone Number Formatting in Excel - Tutorial Feat. Image
    How to Format Phone Numbers in Excel (with…
  • How to use the TEXT function in Excel to Combine Text with Numbers (image)
    TEXT Function: Combine Text with Numbers…
  • How to Use Conditional Formatting in Excel to Highlight Cells - Tutorial
    How to Use Highlight Cells Rules in Excel…

❤ Support Free Excel Training by Sharing -

blank

About Y. Acosta

Yil's (pronounced like "Jill") passion for Excel spreadsheets can be traced back to her days in marketing, where she spent significant time working on analytics. As a content creator, she now specializes in Excel spreadsheet tutorials. Make sure to visit the About page to learn more.

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Follow us:

Latest Tutorial:

Featured image for How to Use Find & Replace to Remove Wildcard Characters in Excel article

Click Here for More Excel Tutorials!!!

Get Your FREE pdf of Top Excel Keyboard Shortcuts!

* indicates required

blank

Image-button for Invoice Template for Etsy

Copyright © 2025

  • Home
  • Excel Tutorials
  • Resources
  • About Me
  • Privacy Policy & Terms of Use
  • Disclaimer
  • Advertiser Disclosure
  • Contact Me
  • FREE Printable List of Top Excel Keyboard Shortcuts
We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
Do not sell my personal information.
SettingsAccept
Privacy & Cookies Policy

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these cookies, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may have an effect on your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Non-necessary
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
SAVE & ACCEPT