# How to convert numbers to text in Excel

Use =TEXT(A2,"0") for whole numbers, or =A2&"" to keep the number exactly as it is. Both return text.

**Excel:** `=TEXT(A2,"0")` (Every current version)

**Google Sheets:** the same formula works.

## Example

Sample data (row 1 is the header):

| A | B |
| --- | --- |
| Product code (number) | As text |
| 10442 |  |
| 10457 |  |
| 20871 |  |
| 30019 |  |
| 41160 |  |

Formula in B2, filled to B6: `=TEXT(A2,"0")`

Result: 10442; 10457; 20871; 30019; 41160

## How it works

Lookups compare types: the number 10442 doesn't match the text "10442" in another system's export. TEXT with the format "0" returns the digits as text, and you can choose another format to control exactly how the text looks.

## Other ways

- `=A2&""`: Joining an empty text converts the number as it is stored, decimals included.
- `=TEXT(A2,"#,##0")`: Adds a thousands separator. ("10,442" instead of "10442".)

## Common mistakes

- Changing the cell format to Text doesn't convert numbers that are already there; it only affects new entries.
- Numbers with more than 15 digits, like card numbers, have already lost their last digits. Import them as text.
- The result can't be summed. Keep the original number column for calculations.

## Questions

**How do I keep decimals?**

Use a format with decimals, `=TEXT(A2,"0.00")`, or `=A2&""`.

**How do I stop a long number showing as 4.41E+11?**

Convert it with all its digits: `=TEXT(A2,"0")`.

Every formula and result on this page was checked by running it in the Spreadsheet Practice formula engine on 2026-10-30.

Source: https://spreadsheetpractice.com/formulas/convert-numbers-to-text
