Formatting Issues

How to Fix Excel Custom Number Format Displaying Text Incorrectly

Olivia MillerOlivia Miller Oct 26, 2026 869 views

Question details

Users experience incorrect text display when adding text directly into an Excel custom number format without proper syntax.

How to Fix Excel Custom Number Format Displaying Text Incorrectly
Product
Excel
Device & OS
not provided
Scenario
Applying a custom number format to cells to append or prepend text literals alongside numeric values.
Observed behavior
Letters and text do not display correctly or cause formatting errors because they are interpreted as formatting codes instead of literal text strings.
Before you start

Identify the specific cells where you want to apply the custom number format and decide on the exact text prefix or suffix you need to include.

Solution 1Recommended

Enclose Text Literals in Quotation Marks

The standard and most effective method to include plain text in a custom number format is wrapping the specific text string in double quotation marks.

Excel requires any literal text inside a custom number format to be enclosed in double quotes. Without them, Excel attempts to interpret the letters as formatting codes (such as 'm' for months, 'd' for days, or 'h' for hours), leading to unintended and incorrect data displays.

1
Select the target cells

Highlight the cell or range of cells in your spreadsheet where you want to apply the custom text formatting.

2
Open the Format Cells dialog

Right-click the highlighted selection and choose "Format Cells" from the context menu, or simply press the Ctrl+1 shortcut on your keyboard.

3
Navigate to Custom formats

In the Format Cells window, go to the "Number" tab and select "Custom" from the Category list on the left side.

4
Apply quotation marks to your text

In the "Type" field, enter your desired format by wrapping the text in double quotes alongside the number placeholders. For example, to display 'HUDA007' when typing '7', enter "HUDA"000. To display 'HUDA7', enter "HUDA"0.

5
Save and apply

Click the "OK" button to apply the new formatting rule to your selected cells.

Enclose Text Literals in Quotation Marks
Pro Tip: You can use this method to add text prefixes, suffixes, or even insert words between numbers by simply adjusting where you place the quotation marks in relation to the zero (0) or hash (#) placeholders.
Data Formatting Made Easy

Apply Custom Number Formats Easily with WPS Spreadsheet

WPS Spreadsheet provides a highly intuitive and fully compatible platform for managing complex data formats. You can effortlessly apply custom number formatting, insert text literals, and organize your data just as you would in Microsoft Excel without any steep learning curve.

  1. 1. Open your document: Launch WPS Spreadsheet and select the target cells containing the numbers you wish to format.
  2. 2. Access Format Cells: Right-click the selected cells and choose "Format Cells", or use the convenient Ctrl+1 keyboard shortcut.
  3. 3. Select Custom Category: Under the "Number" tab in the dialog box, click on the "Custom" category at the bottom of the list.
  4. 4. Input the quoted text format: Type your desired format rule into the input box, ensuring your literal text is wrapped in double quotes (e.g., "ID-"0000), and click "OK".
Fully compatible with Microsoft Excel (.xlsx) file formats, ensuring your custom formatting rules remain intact across platforms.Intuitive cell formatting dialog makes it easy to add text strings and custom prefixes/suffixes to numeric data.Lightweight, fast, and free software that runs smoothly on Windows, Mac, and Linux environments.
microsoft office alternative - wps office

Frequently Asked Questions

Why does Excel turn my custom text into dates or times?

If you use specific letters like 'm', 'd', 'y', 'h', or 's' without enclosing them in double quotation marks, Excel misinterprets them as date or time formatting codes rather than plain text. Always wrap literal text in quotes to prevent this.

Can I add a text suffix instead of a prefix in my custom format?

Yes, simply place the quotation marks and your text after the number placeholder in the Type box. For example, entering 0.00 "kg" will format the number 5 to display as '5.00 kg'.

Is it possible to display different text for positive and negative numbers?

Absolutely. Custom number formats allow up to four sections separated by semicolons (Positive; Negative; Zero; Text). You can add specific quoted text to each section, such as "Gain" 0; "Loss" -0 to differentiate value types automatically.