How to truncate text with an ellipsis
✓ Verified in LibreOffice 25.8.7.3Cap long descriptions at N characters, adding "..." only when something was cut.
The formula
| App | Formula | Notes |
|---|---|---|
| Excel | =IF(LEN(A2)>20,LEFT(A2,17)&"...",A2) | 20 = the cap; 17 = cap minus the 3 ellipsis dots. Adjust both together. |
| Google Sheets | =IF(LEN(A2)>20,LEFT(A2,17)&"...",A2) | Identical. |
| LibreOffice Calc | =IF(LEN(A2)>20,LEFT(A2,17)&"...",A2) | Identical. |
How it works
The IF guard is what makes it polite: short values pass through untouched, and only genuinely long ones get cut to 17 characters plus "..." — so the result never exceeds the 20-character cap and never shows a pointless ellipsis on text that fit anyway. A tidier variant avoids cutting mid-word: =IF(LEN(A2)>20,LEFT(A2,FIND(" ",A2&" ",17))&"...",A2) backs up to a space. Remember this is display text — keep the full value in its own column.
Verified, not just documented
We ran =IF(LEN(A2)>20,LEFT(A2,17)&"...",A2) in LibreOffice 25.8.7.3 (headless, with forced recalculation) and it returned The quick brown f... — exactly the expected result. Every formula here is confirmed by actually executing it.