Spreadsheet Practice

How to truncate text and add an ellipsis in Excel

Formula (Excel and Google Sheets)

=IF(LEN(A2)>$E$1,TRIM(LEFT(A2,$E$1-3))&"...",A2)

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

Result on the example
one result per row in B2, filled down to B6
Works in
Excel 2024 and Microsoft 365
Google Sheets
Same formula

See it work

The formula is already in B2, filled down to B6. Change any input and the result updates, or edit the formula to experiment.

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.

=IF(LEN(A2)>$E$1,TRIM(LEFT(A2,$E$1-3))&"...",A2)

Result"Ergonomic office..."

  1. A2"Ergonomic office chair with lumbar support"

    The value in A2.

  2. LEN(A2)42

    LEN: Number of characters.

    • textA2"Ergonomic office chair with lumbar support"
  3. $E$120

    The value in E1.

  4. LEN(A2)>$E$1TRUE

    The > operator tests greater than.

  5. $E$1-317

    The - operator subtracts.

  6. LEFT(A2,$E$1-3)"Ergonomic office "

    LEFT: Characters from the start of text.

    • textA2"Ergonomic office chair with lumbar support"
    • num_chars$E$1-317
  7. TRIM(LEFT(A2,$E$1-3))"Ergonomic office"

    TRIM: Removes extra spaces, leaving single spaces between words.

    • textLEFT(A2,$E$1-3)"Ergonomic office "
  8. TRIM(LEFT(A2,$E$1-3))&"...""Ergonomic office..."

    The & operator joins as text.

  9. IF(LEN(A2)>$E$1,TRIM(LEFT(A2,$E$1-3))&"...",A2)"Ergonomic office..."

    IF: Returns one value if a test is true, another if false.

    • logical_testLEN(A2)>$E$1TRUE
    • value_if_trueTRIM(LEFT(A2,$E$1-3))&"...""Ergonomic office..."
    • value_if_falseA2"Ergonomic office chair with lumbar support"not used

In Google Sheets

The same formula works in Google Sheets: =IF(LEN(A2)>$E$1,TRIM(LEFT(A2,$E$1-3))&"...",A2). We ran it in Google Sheets mode on the same data and it returns the same results.

Other ways to do it

Each one was run on the same example sheet.

FormulaResultWhen to use it
=IF(LEN(A2)>$E$1,TEXTBEFORE(LEFT(A2,$E$1-2)," ",-1)&"...",A2)Ergonomic office..., Desk lamp, Adjustable...…Different resultExcel 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)).

Try it yourself

Same data, empty answer cell. Your formula is graded instantly, then re-checked on changed data, so a typed-in number won't pass.

Truncate text and add an ellipsis

In B2, shorten titles longer than the limit in E1: keep the first characters and end with "...", so the result fits the limit. Fill down to B6.

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").

Checked by running on 2026-10-30: every formula and result on this page was calculated by the Spreadsheet Practice formula engine, in both Excel and Google Sheets modes.