# TO_TEXT function in Google Sheets

> TO_TEXT converts a number into text.

Source: https://spreadsheetpractice.com/google-sheets/functions/to-text · Updated October 28, 2026 · Formulas and results on this page were run by the Spreadsheet Practice formula engine on November 20, 2026

## Quick answer

- **What it does:** TO_TEXT converts a number into text.
- **Syntax:** `=TO_TEXT(value)`
- **Most common use:** `=TO_TEXT(A2)` returns 90210 (The number as text: it no longer adds up in SUM)
- **Works in:** Google Sheets only
- **Returns:** Text.

## What it does

TO_TEXT converts a number into text. Its main job in Google Sheets is feeding numbers to functions that only accept text, such as REGEXMATCH and REGEXEXTRACT, and keeping codes like ZIP codes from being treated as amounts.

## Syntax

`=TO_TEXT(value)`

| Argument | Required? | What it is |
|---|---|---|
| `value` | Required | The number or cell to convert. Text passes through unchanged. |

## Examples

Each result was calculated by running the formula on the sample sheet in Google Sheets mode.

| Cell | Formula | Result | What it shows |
|---|---|---|---|
| B2 | `=TO_TEXT(A2)` | 90210 | The number as text: it no longer adds up in SUM |
| B3 | `=REGEXMATCH(TO_TEXT(A3),"^1")` | TRUE | REGEXMATCH needs text, so TO_TEXT goes inside it |
| B4 | `=REGEXEXTRACT(TO_TEXT(A4),"^\d{3}")` | 606 | The first three digits of the ZIP code |

### The sample sheet

Every formula above runs on this data:

|  | A | B |
|---|---|---|
| 1 | ZIP | Result |
| 2 | 90210 | 90210 |
| 3 | 10001 | TRUE |
| 4 | 60614 | 606 |

## Common mistakes

| What you see | Why, and how to fix it |
|---|---|
| SUM ignores the converted values | TO_TEXT returns text, and SUM skips text. Keep the original numbers for math, and convert only where a function needs text. |
| #VALUE! from REGEXMATCH on a column of numbers | Convert the whole range inside it: =ARRAYFORMULA(REGEXMATCH(TO_TEXT(A2:A10),"^9")). |
| Leading zeros are already gone | TO_TEXT can't bring back zeros that were never stored. A ZIP code like 02134 typed into a number cell is stored as 2134; format the column as plain text (Format > Number > Plain text) before typing. |

## Tips

- A2&"" also turns a number into text, and works the same way in Excel.
- To choose how the number looks, such as with a currency sign, use TEXT with a format pattern instead.

## TO_TEXT in Excel

Excel has no TO_TEXT, and its text functions accept numbers directly. Excel users convert with TEXT(A2,"0") or by joining an empty string: A2&"".

## Questions

### Why does REGEXMATCH say it expects text values?

The cell holds a number. Convert it with TO_TEXT: =REGEXMATCH(TO_TEXT(A2),"^9").

### What is the difference between TO_TEXT and TEXT?

TEXT takes a format pattern, such as TEXT(A2,"$#,##0.00"), so you decide how the number looks. TO_TEXT has no pattern argument; it just turns the value into text.

---

Spreadsheet Practice (https://spreadsheetpractice.com) teaches spreadsheet formulas by practice: every exercise is graded in a live grid and re-checked on changed data.
