• Microsoft Office
  • Microsoft Windows
  • Other Software
    • Microsoft Visual
    • Microsoft Project
    • Microsoft Visio
  • Anti Virus
  • Blog
    • Word
    • Excel
    • Powerpoint
    • Software tricks/tips
  • POLICIES
    • PAYMENT GUIDE
    • SHIPPING POLICY
    • REFUND POLICY
    • TERMS & CONDITIONS
    • Contact Us

No products in the cart.

  • Microsoft Office
  • Microsoft Windows
  • Other Software
    • Microsoft Visual
    • Microsoft Project
    • Microsoft Visio
  • Anti Virus
  • Blog
    • Word
    • Excel
    • Powerpoint
    • Software tricks/tips
  • POLICIES
    • PAYMENT GUIDE
    • SHIPPING POLICY
    • REFUND POLICY
    • TERMS & CONDITIONS
    • Contact Us

No products in the cart.

  • Microsoft Office
  • Microsoft Windows
  • Other Software
    • Microsoft Visual
    • Microsoft Project
    • Microsoft Visio
  • Anti Virus
  • Blog
    • Word
    • Excel
    • Powerpoint
    • Software tricks/tips
  • POLICIES
    • PAYMENT GUIDE
    • SHIPPING POLICY
    • REFUND POLICY
    • TERMS & CONDITIONS
    • Contact Us

No products in the cart.

  • Microsoft Office
  • Microsoft Windows
  • Other Software
    • Microsoft Visual
    • Microsoft Project
    • Microsoft Visio
  • Anti Virus
  • Blog
    • Word
    • Excel
    • Powerpoint
    • Software tricks/tips
  • POLICIES
    • PAYMENT GUIDE
    • SHIPPING POLICY
    • REFUND POLICY
    • TERMS & CONDITIONS
    • Contact Us
Excel

How to Enforce a Consistent Phone Number Format in Microsoft Excel

0 Comments

How to Enforce a Consistent Phone Number Format in Microsoft Excel. Ensuring the accuracy of data entered in Microsoft Excel is crucial to avoid incorrect information. This is especially important for phone numbers, as entering an invalid phone number can render it useless. Mistakes can occur when users enter non-numeric characters or input an incorrect number of digits. While a custom number format can address the format aspect, it alone is not sufficient.

In this tutorial, I will demonstrate how to combine a custom number format with data validation to enforce the correct number of numeric digits. However, it’s important to note that users can still input incorrect numeric digits, as this cannot be prevented.

How to Enforce a Consistent Phone Number Format in Microsoft Excel

Determining Requirements in Excel

Phone numbers typically consist of 10 numeric digits and follow the format (xxx) xxx-xxxx. Let’s break down the requirements for a phone number in Excel:

  1. Must have 10 characters.
  2. Must be displayed in the (xxx) xxx-xxxx format.
  3. Must consist of numerical digits.

The (###) ###-#### custom format can address the format requirement, while data validation can be used for the other two requirements. It’s worth mentioning that there are two custom formats that can be helpful when formatting phone numbers:

  1. (###) ###-####: The “#” character acts as a numeric digit placeholder.
  2. (000) 000-0000: The “0” character is also a digit placeholder, but it displays a “0” when there aren’t enough input digits.

Figure A

How to Enforce a Consistent Phone Number Format in Microsoft Excel

How to Enforce a Consistent Phone Number Format in Microsoft Excel

demonstrates both custom formats applied to the same phone number. However, neither format resolves all potential issues. While both formats work correctly when the input value contains 10 numeric digits, they fail under the following circumstances:

  1. When the input value contains non-numeric characters.
  2. When the input value has less than 10 digits.
  3. When the input value exceeds 10 digits.

To address these issues, both a custom format and data validation are required.

Applying a Custom Format in Excel

The solution involves a combination of a custom format and data validation. Let’s use a Table object to enter the same input values and observe how the custom format and data validation handle each case.

First, let’s create the custom format for column C of the Table object, as shown in Figure B:

  1. Right-click on cell C3 and choose “Format Cells” from the submenu.
  2. In the Category list, select “Custom” at the bottom.
  3. In the Type control, choose “General” and enter “(###) ###-####” as the custom format. If the format is already in the list, select it. Note the space character between the “)” and “#” characters.
  4. Click “OK.”

Figure B

How to Enforce a Consistent Phone Number Format in Microsoft Excel

How to Enforce a Consistent Phone Number Format in Microsoft Excel

showcases the addition of a custom format.

Next, we need to apply data validation.

Applying Data Validation in Excel

Excel’s data validation feature enables the limitation of data input to ensure accuracy. While data validation controls can enforce basic business rules, they can also handle more complex requirements. In this case, we will use an expression.

To apply data validation, follow these steps:

  1. Select cell C3 if it’s not already selected.
  2. Click the “Data” tab.
  3. In the “Data Tools” group, click the “Data Validation” option.
  4. In the resulting dialog, choose “Custom” from the “Allow” dropdown.
  5. In the “Formula” control, enter the following expression: =AND(ISNUMBER(C3),LEN(C3)=10 (Figure C).
  6. Click “OK.”

Figure C

How to Enforce a Consistent Phone Number Format in Microsoft Excel

How to Enforce a Consistent Phone Number Format in Microsoft Excel

Demonstrates the entry of an expression to reject entries that are not exactly 10 non-numeric characters.

The expression =AND(ISNUMBER(A2),LEN(A2)=10 

  1. Is the entry a number?
  2. Is the number exactly 10 characters long?

If either of these conditions is not met, data validation will reject the entry.

Now, let’s see how the custom format and data validation work together to enforce the proper formatting of phone numbers. Enter “1234567890” in cell C3 and press Tab. The custom format will display the value as expected, as shown in Figure D.

Figure D:

How to Enforce a Consistent Phone Number Format in Microsoft Excel

How to Enforce a Consistent Phone Number Format in Microsoft Excel

The input value contains 10 numeric digits, so the custom format works correctly.

Figure E illustrates the result of entering “a234567890”. Since the input value contains a non-numeric character (“a”), data validation displays an error. Clicking “Retry,” replacing “a” with “1,” and pressing Tab will result in data validation accepting the entry. It’s important to note that because we are using an Excel Table object, both the custom format and data validation will be automatically applied to new records.

Figure E:

How to Enforce a Consistent Phone Number Format in Microsoft Excel

How to Enforce a Consistent Phone Number Format in Microsoft Excel

Data validation rejects this input value because it contains a non-numeric character.

Entering “12345678” and “12345678901” will also fail data validation. The former has too few digits, while the latter has too many. Make the necessary corrections so that data validation accepts both, as shown in Figure F.Enforce a Consistent Phone Number Format 6

Figure F: Combining a custom format and data validation ensures accurate formatting.

While it is not possible to prevent users from entering incorrect numeric characters, the combination of these two features can help detect other input errors. Many users are unaware that these two features can be combined for better input control.

Rate this post
18
242 Views
How to Efficiently Use Excel StylesPrevHow to Efficiently Use Excel StylesMay 25, 2023
How to create a fun people chart in Microsoft ExcelMay 25, 2023How to create a fun people chart in Microsoft ExcelNext

Leave a Reply Cancel reply

You must be logged in to post a comment.

Buy Windows 11 Professional MS Products CD Key
Buy Office 2021 Professional Plus Key Global For 5 PC
Top rated products
  • Windows Server 2022 Datacenter Key Global Windows Server 2022 Datacenter Key Global
    Rated 5.00 out of 5
    $7.00
  • Kaspersky Small Office Security 10 PCs + 10 Mobiles + 1 Server 1 Year Kaspersky Small Office Security 10 PCs + 10 Mobiles + 1 Server 1 Year
    Rated 5.00 out of 5
    $164.50
  • Avast Ultimate Suite 2021 1 Year 10 Devices Global Avast Ultimate Suite 2021 1 Year 10 Devices Global
    Rated 5.00 out of 5
    $54.00
  • Windows 11 Pro Key Global Windows 11 Pro Key Global
    Rated 5.00 out of 5
    $6.00
  • Avast Premium Security 2021 10 Devices 2 Years Global Avast Premium Security 2021 10 Devices 2 Years Global
    Rated 5.00 out of 5
    $41.00
Products
  • SQL Server 2014 Standard SQL Server 2014 Standard $20.00
  • Project Professional 2024 Project Professional 2024 $33.00
  • Buy Office 2021 Professional Plus Key Global For 5 PC Buy Office 2021 Professional Plus Key Global For 5 PC
    Rated 5.00 out of 5
    $68.00
  • Microsoft Visual Studio Enterprise 2019 For 1 PC Microsoft Visual Studio Enterprise 2019 For 1 PC
    Rated 4.88 out of 5
    $15.00
  • Microsoft Visual Studio Enterprise 2022 For 1 PC Microsoft Visual Studio Enterprise 2022 For 1 PC $19.00
  • Windows Server2008 R2 Remote Desktop Services device connections (20)cal Windows Server2008 R2 Remote Desktop Services device connections (20)cal $29.00
  • Microsoft Office 2019 Home and Student for PC Key Global bind to your Microsoft account Microsoft Office 2019 Home and Student for PC Key Global bind to your Microsoft account
    Rated 4.95 out of 5
    $58.00
  • AVG Internet Security 2021 1 Device 1 Year Global AVG Internet Security 2021 1 Device 1 Year Global
    Rated 5.00 out of 5
    $11.00
  • AVG Ultimate 2021 with Antivirus + Cleaner, Secure VPN 10 Devices 1 Year AVG Ultimate 2021 with Antivirus + Cleaner, Secure VPN 10 Devices 1 Year
    Rated 4.91 out of 5
    $34.00
  • Windows 10 Pro Key Global 20 PC Windows 10 Pro Key Global 20 PC $50.00
Product categories
  • Anti Virus
  • Microsoft Office
  • Microsoft Project
  • Microsoft Visio
  • Microsoft Visual
  • Microsoft Windows
  • Other Software
  • Uncategorized

Buffcom.net always brings the best digital products and services to you. Specializing in Office Software and online marketing services

BIG SALE 50% IN MAY

Microsoft Office
Microsoft Windows
Anti-Virus
Contact Us

Visit Us:

125 Division St, New York, NY 10002, USA

Mail Us:

buffcom.net@gmail.com

TERMS & CONDITIONS | PAYMENT GUIDE  | SHIPPING POLICY  | REFUND POLICY

Copyright © 2019 buffcom.net  All Rights Reserved.