Convert Numbers to Text in Excel
To convert a number to text in Excel, use =TEXT(A2,"0"), or =A2&"" when you do not need a format code. Format the column as Text before you paste an ID longer than 15 digits, because Excel drops the extra digits once it stores the value as a number.
Convert a number to text with TEXT
The formula is =TEXT(A2,"0"). It returns the number in A2 as text. Use =TEXT(A2,"00000") when the text must keep a fixed width, so 123 displays as 00123. The result is left-aligned, which is a quick sign Excel now treats it as text.
TEXT does not change A2. Copy the helper column and use Paste Special, Values when you want the text without the formula.
Force text without a format code
=A2&"" appends an empty string and returns text. Use it when you only need the data type, not a display format. =CONCAT(A2) does the same for one cell.
For a single cell you type yourself, start with an apostrophe: '00123. Excel shows 00123 and stores text. The apostrophe is not a method for a whole column.
A column that is already imported
Select the column, then Data, Text to Columns. Click Next twice. In step 3, choose Text, then Finish. Excel rewrites the current values as text. Digits Excel already dropped are not restored.
Excel keeps 15 significant digits. A 16-digit account number that arrived as a number has already lost the end. Format the column as Text before you paste, or set the column to Text in Data, From Text/CSV, so the next import stays intact. Formatting as Text after the fact does not bring the missing digits back.
A green triangle in the corner means the cell is text. That is expected after this conversion. Numbers you still need to add should stay numbers in another column.
Direct answers
How do I convert numbers to text in Excel?
In another cell, enter =TEXT(A2,"0"), or =A2&"" if you do not need a format. Copy the column and Paste Special, Values to keep the text without the formula.
What is the formula to convert a number to text?
=TEXT(A2,"0") for a plain integer. =TEXT(A2,"00000") keeps a fixed width, so 123 becomes 00123. The quotes around the code are required.
How do I convert a whole column of numbers to text?
Select the column, then Data, Text to Columns, Next, Next. In step 3 choose Text and click Finish. This rewrites the current values. It cannot restore digits Excel already dropped.
How do I keep leading zeros when I convert to text?
Type an apostrophe before a single code, such as '00123. For a column, use =TEXT(A2,"00000") with as many zeros as digits you need, or format the cells as Text before you paste.
Ask Elyx in Excel: "Convert this ID column to text and keep the leading zeros." Elyx does it in the workbook. 7-day trial, no card.
Start the 7-day trial