# How to truncate text and add an ellipsis in Excel

Cut long text and add "...": =IF(LEN(A2)>20,TRIM(LEFT(A2,17))&"...",A2). Text within the limit stays unchanged.

**Excel:** `=IF(LEN(A2)>$E$1,TRIM(LEFT(A2,$E$1-3))&"...",A2)` (Excel 2024 and Microsoft 365)

**Google Sheets:** the same formula works.

## Example

Sample data (row 1 is the header):

| A | B | C | D | E |
| --- | --- | --- | --- | --- |
| Product title | Short title |  | Max length | 20 |
| Ergonomic office chair with lumbar support |  |  |  |  |
| Desk lamp |  |  |  |  |
| Adjustable standing desk, walnut, 140 cm |  |  |  |  |
| USB-C dock |  |  |  |  |
| Noise-cancelling wireless headset |  |  |  |  |

Formula in B2, filled to B6: `=IF(LEN(A2)>$E$1,TRIM(LEFT(A2,$E$1-3))&"...",A2)`

Result: Ergonomic office...; Desk lamp; Adjustable standi...; USB-C dock; Noise-cancelling...

## How it works

The three dots take 3 characters, so LEFT keeps `$E$1-3` and the result is never longer than the limit. TRIM removes a space left at the cut, so you get "Ergonomic office..." and not "Ergonomic office ...". Short titles fail the LEN test and come back unchanged.

## Other ways

- `=IF(LEN(A2)>$E$1,TEXTBEFORE(LEFT(A2,$E$1-2)," ",-1)&"...",A2)`: Excel 365: cuts back to the last whole word so no word is broken. ("Adjustable..." instead of "Adjustable standi...".)

## Common mistakes

- Forgetting to subtract 3 makes the result 3 characters over the limit.
- A single word longer than the limit has no space to cut at, so the whole-word version returns #N/A. Add a fallback: `TEXTBEFORE(…," ",-1,,,LEFT(A2,$E$1-3))`.

## Questions

**How do I use a single ellipsis character instead of three dots?**

Type … (Alt+0133 on Windows) inside the quotes and subtract 1 instead of 3.

**How do I flag titles that are too long instead?**

Use `=IF(LEN(A2)>$E$1,"Too long","OK")`.

Every formula and result on this page was checked by running it in the Spreadsheet Practice formula engine on 2026-10-30.

Source: https://spreadsheetpractice.com/formulas/truncate-text-and-add-ellipsis
