← Cheat Sheets

Spreadsheet Text Functions

Clean, split and combine text.

# Spreadsheet Text Functions

Clean, split and combine text.

| Task | Formula |
|---|---|
| Left / right / middle | `=LEFT(A1,3)` `=RIGHT(A1,3)` `=MID(A1,2,4)` |
| Length | `=LEN(A1)` |
| Remove extra spaces | `=TRIM(A1)` |
| Case | `=UPPER(A1)` `=LOWER(A1)` `=PROPER(A1)` |
| Join | `=A1&" "&B1` or `=TEXTJOIN(", ",TRUE,A1:A5)` |
| Replace text | `=SUBSTITUTE(A1,"old","new")` |
| Find position | `=FIND("x",A1)` (case sensitive) `=SEARCH("x",A1)` |
| Number to text | `=TEXT(A1,"0.00")` |
| Text to number | `=VALUE(A1)` |
| Repeat | `=REPT("-",10)` |