# Text formulas in Excel and Google Sheets

> Split, join, extract and clean text: names, emails, codes and messy imports. 6 answers, each checked by running it.

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

## Answers

- [How to extract the first name from a full name in Excel](https://spreadsheetpractice.com/formulas/extract-first-name): In Excel 365 use =TEXTBEFORE(A2," "). In any version, =LEFT(A2,FIND(" ",A2)-1) takes everything before the first space. `=TEXTBEFORE(A2," ")`
- [How to extract text after a character in Excel](https://spreadsheetpractice.com/formulas/extract-text-after-a-character): Use =TEXTAFTER(A2,"@") in Excel 365. In any version, =MID(A2,FIND("@",A2)+1,LEN(A2)) returns everything after the character. `=TEXTAFTER(A2,"@")`
- [How to combine text from two cells in Excel](https://spreadsheetpractice.com/formulas/combine-text-from-two-cells): Join them with & and put a space in quotes between: =A2&" "&B2. TEXTJOIN joins whole ranges with a separator. `=A2&" "&B2`
- [How to remove extra spaces from text in Excel](https://spreadsheetpractice.com/formulas/remove-extra-spaces): Use =TRIM(A2). It removes spaces at the start and end and turns runs of spaces between words into one. `=TRIM(A2)`
- [How to capitalize the first letter of each word in Excel](https://spreadsheetpractice.com/formulas/capitalize-first-letter-of-each-word): Use =PROPER(A2). It capitalizes the first letter of every word and lowercases the rest. `=PROPER(A2)`
- [How to count characters in a cell in Excel](https://spreadsheetpractice.com/formulas/count-characters-in-a-cell): Use =LEN(A2). It counts every character, including spaces and punctuation. `=LEN(A2)`

More topics: [Counting formulas](https://spreadsheetpractice.com/formulas/topic/count) · [Sum formulas](https://spreadsheetpractice.com/formulas/topic/sum) · [Lookup formulas](https://spreadsheetpractice.com/formulas/topic/lookup) · [IF and logic formulas](https://spreadsheetpractice.com/formulas/topic/logic) · [Date formulas](https://spreadsheetpractice.com/formulas/topic/date) · [Dynamic array formulas](https://spreadsheetpractice.com/formulas/topic/dynamic) · [Duplicates and data cleanup formulas](https://spreadsheetpractice.com/formulas/topic/cleanup) · [Rounding and math formulas](https://spreadsheetpractice.com/formulas/topic/math) · [Percentage formulas](https://spreadsheetpractice.com/formulas/topic/percent)

Every answer: [Formula answers](https://spreadsheetpractice.com/formulas). Formulas used: `TEXTBEFORE`, `LEFT`, `FIND`, `TEXTAFTER`, `REGEXEXTRACT`, `CONCAT`, `TEXTJOIN`, `TRIM`, `PROPER`, `LEN`

---

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