# TEXT formula generator

> Describe what you need and get a TEXT formula for Excel and Google Sheets, run on real data before you copy it. Plus 8 tested TEXT examples.

Source: https://spreadsheetpractice.com/tools/formula-generator/text · Updated October 29, 2026 · Formulas and results on this page were run by the Spreadsheet Practice formula engine on November 20, 2026

TEXT turns a number or date into text in the format you choose, such as "$1,250.00" or "March 2026".

Describe the task at [TEXT formula generator](https://spreadsheetpractice.com/tools/formula-generator/text) and get a TEXT formula for Excel and Google Sheets, tested on real data.

## Tested TEXT examples

### Calculate running pace per mile

`=C2/B2`

Excel. Result on the sample sheet: 5 rows (D2:D6). [See it and try it](https://spreadsheetpractice.com/formulas/running-pace-per-mile)

### Calculate the hours between two times

`=(C2-B2)*24`

Excel. Result on the sample sheet: 6 rows (D2:D7). [See it and try it](https://spreadsheetpractice.com/formulas/hours-between-two-times)

### Convert numbers to text

`=TEXT(A2,"0")`

Excel. Result on the sample sheet: 5 rows (B2:B6). [See it and try it](https://spreadsheetpractice.com/formulas/convert-numbers-to-text)

### Get the month name from a date

`=TEXT(A2,"mmmm")`

Excel. Result on the sample sheet: 5 rows (B2:B6). [See it and try it](https://spreadsheetpractice.com/formulas/get-month-name-from-a-date)

### Add leading zeros to numbers

`=TEXT(A2,"00000")`

Excel. Result on the sample sheet: 5 rows (B2:B6). [See it and try it](https://spreadsheetpractice.com/formulas/add-leading-zeros)

### Why does a date turn into a number when joined with text

`=B2&" is due on "&TEXT(C2,"mmm d, yyyy")`

Excel. Result on the sample sheet: 4 rows (D2:D5). [See it and try it](https://spreadsheetpractice.com/formulas/date-turns-into-number-when-joined-with-text)

### Combine text and a number without losing formatting

`=A2&" sales: "&TEXT(B2,"$#,##0")&" ("&TEXT(C2,"+0.0%;-0.0%")&")"`

Excel. Result on the sample sheet: 4 rows (D2:D5). [See it and try it](https://spreadsheetpractice.com/formulas/combine-text-and-a-number-keep-formatting)

### Why does my percentage show as a decimal

`=B2/C2`

Excel. Result on the sample sheet: 5 rows (D2:D6). [See it and try it](https://spreadsheetpractice.com/formulas/percentage-shows-as-decimal)

## Questions

### What does the TEXT formula generator do?

You describe the task in plain English, and it writes the formula, using TEXT where that's the right tool, for your table or a sample one. The formula is run in our engine in Excel and Google Sheets mode before you see it, so you get its result, not just a guess.

### What does TEXT do?

TEXT turns a number or date into text in the format you choose, such as "$1,250.00" or "March 2026".

### Can I learn to write TEXT formulas myself?

Yes. Each example below opens a page where you try the formula in a live grid and it's checked as you go, and the TEXT function page has a practice exercise.

---

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