Removing leading zeros is not the default, but still wants to convert

Copper Contributor

Hi, hope someone can help.  Excel seems to work differently on each of my PCs.  On my newest laptop the leading zeros are being removed by default, even though in Data Options this is not selected.  Then, when I select Don't Convert, the page closes.  Any help would be appreciated!

 

PetTagsCT27FG_0-1713945823877.png

 

6 Replies

@Pet-TagsCT27FG 

It sounds like you are encountering an issue with Excel automatically removing leading zeros from your data, even though you have the option to disable this behavior selected. Here are a few troubleshooting steps you can try:

  1. Check Data Format: Ensure that the cells containing the data with leading zeros are formatted as text. To do this, select the cells, right-click, choose "Format Cells," and then select "Text" from the Category list. This should prevent Excel from removing leading zeros.
  2. Verify Data Entry: Double-check how the data is entered into Excel. If you're typing or pasting data directly into cells, Excel may interpret it as a number and remove leading zeros. To prevent this, consider prefixing the data with an apostrophe (') before entering it (e.g., '00123). This tells Excel to treat the entry as text.
  3. Check Excel Options: Go to Excel Options > Advanced > Editing Options and ensure that the "Enable automatic content type recognition" option is unchecked. This option can sometimes interfere with the treatment of data as text.
  4. Test on Different PCs: Since you mentioned that Excel behaves differently on your different PCs, try opening the same file on a different PC and see if the issue persists. This can help determine if the problem is specific to your newest laptop or if it's related to the Excel installation or file itself.
  5. Repair Excel: If the issue persists and seems to be related to your newest laptop, you may want to consider repairing Excel on that device. There may be a configuration issue or a software glitch causing the behavior. In the worst case scenario, you will have to reinstall Office.
  6. Update Excel: Ensure that Excel on your newest laptop is up to date with the latest updates and patches from Microsoft. Sometimes, software updates can fix bugs or issues with existing functionality.

The text and the steps was created with the help of AI.

 

My answers are voluntary and without guarantee!

 

Hope this will help you.

 

Was the answer useful? Mark as best response and like it!

This will help all forum participants.

@NikolinoDE I'm searching for an answer to the same question. On my version of Excel, there is no "Enable automatic content type recognition" within the Advanced section under Editing Options. I'm sure I have the latest version, so perhaps the location of this setting has changed? Can you please advise? I NEVER want to remove leading zeros, and I would love to have that setting. Thanks! 

@SarahC2320 

I don't have such option eighter. Answer was generated by AI, it easily could suggest something from Google Sheets or like.

Which options exist:

image.png

but it depend on which channel you are if 365 subscription.

@SergeiBaklan 

I did find these options in under my advance settings

 

Screenshot 2024-07-26 002917.png

 

 

@SarahC2320 

Not all Excel versions have the same setup and options for handling data, including the retention or removal of leading zeros. The options and settings can vary depending on the version of Excel you're using (e.g., Excel 2013, Excel 2016, Excel 2019, Excel 365), and whether you're using the desktop application, Excel Online, or Excel for Mac. Below are some general approaches that work across most versions of Excel, though the exact steps might vary slightly:

Approaches to Retain Leading Zeros in Excel

1. Formatting Cells as Text

This is the most straightforward method to ensure that Excel treats the data as text and retains leading zeros.

  • Windows Excel 2013/2016/2019/365:
    • Select the cells where you want to retain leading zeros.
    • Right-click and choose Format Cells.
    • In the Format Cells dialog box, select Text from the Category list.
    • Click OK.
  • Excel for Mac:
    • Select the cells where you want to retain leading zeros.
    • Right-click and choose Format Cells.
    • In the Format Cells dialog box, select Text.
    • Click OK.
  • Excel Online:
    • Select the cells where you want to retain leading zeros.
    • Go to the Home tab.
    • In the Number group, select the drop-down list and choose Text.

2. Using Apostrophe Prefix

By prefixing your data with an apostrophe, you tell Excel to treat the entry as text.

  • Type '00123 directly into the cell.

3. Custom Number Formatting

If you want to keep the data as numbers but display leading zeros, you can use custom number formatting.

  • Windows Excel 2013/2016/2019/365:
    • Select the cells.
    • Right-click and choose Format Cells.
    • In the Format Cells dialog, go to the Number tab and select Custom.
    • In the Type field, enter a format like 00000 for five digits.
    • Click OK.
  • Excel for Mac:
    • Follow the same steps as for Windows.

4. Importing Data with Leading Zeros

When importing data from CSV or other text files, you can specify the data type to retain leading zeros.

  • Text Import Wizard (Older Excel Versions):
    • Open the CSV file using the Import Text File wizard.
    • Specify the column data format as Text for columns that need to retain leading zeros.
  • Power Query (Excel 2016/2019/365):
    • Use Get Data > From Text/CSV.
    • In Power Query Editor, set the data type of the column to Text.

Ensuring Consistent Settings Across Different Versions

  1. Excel Options for Data Handling:
    • Go to File > Options > Advanced.
    • Look for settings related to automatic data recognition and ensure they are set correctly.
  2. Excel Online:
    • As Excel Online has limited functionality compared to the desktop version, some features might not be available or behave differently. Formatting cells as text is usually the most reliable method.

Summary

While the methods for retaining leading zeros are generally consistent, the exact steps and available options can differ slightly across Excel versions and platforms. Formatting cells as text, using an apostrophe prefix, applying custom number formatting, and ensuring correct import settings are the key approaches to prevent Excel from removing leading zeros.

The text and steps were edited with the help of AI.

 

My answers are voluntary and without guarantee!

 

Hope this will help you.

@maylynncoombes 

That's how to show values, not how convert or not convert them (from text with leading zeroes to number)