# CHAR formula generator

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

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

CHAR returns the character for a code number.

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

## Tested CHAR examples

### Add quotes around text

`=""""&A2&""""`

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

### Remove all spaces from a cell

`=SUBSTITUTE(A2," ","")`

Excel. Result on the sample sheet: 5 rows (B2:B6). [See it and try it](https://spreadsheetpractice.com/formulas/remove-all-spaces-from-a-cell)

### Add a line break in a formula

`=A2&CHAR(10)&B2&CHAR(10)&C2`

Excel. Result on the sample sheet: 5 rows (D2:D6). [See it and try it](https://spreadsheetpractice.com/formulas/add-a-line-break-in-a-formula)

### Remove non-breaking spaces

`=TRIM(SUBSTITUTE(A2,CHAR(160)," "))`

Excel. Result on the sample sheet: 5 rows (B2:B6). [See it and try it](https://spreadsheetpractice.com/formulas/remove-non-breaking-spaces)

### Combine a column into one cell

`=TEXTJOIN(", ",TRUE,A2:A7)`

Excel. Result on the sample sheet: Aiko Tanaka, Ben Adams, Chidi Okafor, Dana Novak, Eli Haddad. [See it and try it](https://spreadsheetpractice.com/formulas/combine-a-column-into-one-cell)

### Replace line breaks with commas

`=SUBSTITUTE(A2,CHAR(10),", ")`

Excel. Result on the sample sheet: 5 rows (B2:B6). [See it and try it](https://spreadsheetpractice.com/formulas/replace-line-breaks-with-commas)

## Questions

### What does the CHAR formula generator do?

You describe the task in plain English, and it writes the formula, using CHAR 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 CHAR do?

CHAR returns the character for a code number.

### Can I learn to write CHAR 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 CHAR 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.
