ExcelReady
CourseMock testsFunction guidesBlog
Start freeStart learning for free
ExcelReady

Be Excel-ready before day one. Hands-on practice in your browser, with instant feedback.

Learn

  • Course
  • Mock tests
  • Function guides
  • Blog

Test prep

  • Excel level test
  • Excel test practice
  • Free screening quiz
  • Certificate

Company

  • About
  • Editorial policy
  • Contact
  • Terms
  • Privacy

© 2026 ExcelReady. All rights reserved.

  1. Blog
  2. Text
  3. How to Truncate Text in Excel to a Set Length

How to Truncate Text in Excel to a Set Length

By ExcelReady Team·Updated November 2, 2026·7 min read

The short answer

To truncate text in Excel, use LEFT with the number of characters to keep: =LEFT(A2,20) keeps the first 20. To show that text was cut, add an ellipsis only when needed: =IF(LEN(A2)>20,LEFT(A2,17)&"...",A2). LEN counts the characters, LEFT keeps the start, and the result stays at 20 characters or fewer.

Key takeaways

  • =LEFT(A2,n) keeps the first n characters and drops the rest.
  • =IF(LEN(A2)>20,LEFT(A2,17)&"...",A2) adds an ellipsis only to text that was cut.
  • To cut at a whole word, take one character more than the limit and go back to the last space.
  • TRUNC is for numbers. For text, use LEFT, RIGHT or MID.
On this page+
  1. How to truncate text with LEFT
  2. How to check the length first with LEN
  3. How to truncate text and add an ellipsis
  4. How to truncate text at a whole word
  5. How to remove the last few characters
  6. Truncating text vs hiding it
  7. How to replace the original text with the truncated version
  8. Practise it

To truncate text in Excel, use LEFT to keep a set number of characters from the start: =LEFT(A2,20). Add IF and LEN when you want an ellipsis on long text only, or a few more functions to cut at a whole word. This guide is for anyone fitting product names, titles or comments into a fixed-width label, export or report column.

How to truncate text with LEFT#

LEFT keeps the first characters of a text and drops the rest. Its syntax has two parts:

Excel formula
=LEFT(text, num_chars)
PartWhat it meansExample
textThe cell with the textA2
num_charsHow many characters to keep20

All the examples use this list of product names in A2:A5:

ALength
2Wireless ergonomic keyboard with palm rest42
3USB-C charging cable, 2 m25
4Desk lamp9
5Noise-cancelling headphones27

=LEFT(A2,20) returns Wireless ergonomic k. Spaces and punctuation count as characters. Text shorter than the limit comes back unchanged, so =LEFT(A4,20) returns Desk lamp. LEFT always returns text, even from a number: =LEFT(12345,3) gives the text 123, so wrap it in VALUE if you need to calculate with the result. The LEFT function guide lists every detail, and LEFT, RIGHT and MID explained covers the sister functions.

How to check the length first with LEN#

LEN counts the characters in a cell, including spaces. Use it to see which rows are too long before you cut anything:

Excel formula
=LEN(A2)

This returns 42 for the keyboard. To highlight every name over 20 characters, select the names and add a conditional formatting rule with the formula =LEN(A2)>20. The LEN function guide and the article on counting characters and words go further.

How to truncate text and add an ellipsis#

An ellipsis is the "..." that shows text was cut. Add it only when the text is too long, and keep the total length within the limit:

Excel formula
=IF(LEN(A2)>20,LEFT(A2,17)&"...",A2)
PartWhat it does
LEN(A2)>20Is the text longer than 20 characters?
LEFT(A2,17)&"..."If yes, keep 17 characters and add three dots, for 20 in total
A2If no, show the text unchanged

The & sign joins two pieces of text; see joining text with & and CONCAT. Results on the sample:

Product nameResult
Wireless ergonomic keyboard with palm restWireless ergonomi...
USB-C charging cable, 2 mUSB-C charging ca...
Desk lampDesk lamp
Noise-cancelling headphonesNoise-cancelling ...

The last one has a space before the dots, because character 17 is a space. Wrap LEFT in TRIM to remove it: =IF(LEN(A2)>20,TRIM(LEFT(A2,17))&"...",A2) gives Noise-cancelling....

How to truncate text at a whole word#

Cutting in the middle of a word looks untidy. To cut at the last full word, take one character more than the limit and then go back to the last space. In Microsoft 365 or Excel 2024, TEXTBEFORE makes this short:

Excel formula
=IF(LEN(A2)<=20,A2,TEXTBEFORE(LEFT(A2,21)," ",-1))

LEFT(A2,21) takes 21 characters, and TEXTBEFORE(..., " ", -1) returns everything before the last space. Taking 21 instead of 20 means a word that ends exactly at character 20 is kept. Results:

Product nameResult
Wireless ergonomic keyboard with palm restWireless ergonomic
USB-C charging cable, 2 mUSB-C charging
Desk lampDesk lamp
Noise-cancelling headphonesNoise-cancelling

In older versions, swap the last space for a marker character and find it:

Excel formula
=IF(LEN(A2)<=20,A2,LEFT(A2,FIND("~",SUBSTITUTE(LEFT(A2,21)," ","~",LEN(LEFT(A2,21))-LEN(SUBSTITUTE(LEFT(A2,21)," ",""))))-1))

The LEN minus LEN part counts the spaces, so SUBSTITUTE replaces only the last one with ~, and FIND gives its position. Both versions fail when the first 21 characters contain no space at all, such as a long code. Wrap the formula in IFERROR with LEFT(A2,20) as the fallback. The guide to extracting the last word uses the same space-counting idea.

How to remove the last few characters#

Sometimes you know how many characters to drop rather than how many to keep. Subtract them from the length:

Excel formula
=LEFT(A2,LEN(A2)-4)

With INV-2041-OLD in A2, this removes the last four characters and returns INV-2041. To drop characters from the start instead, use RIGHT with the same idea; see how to remove the first characters from text. To take a piece from the middle, use the MID function.

Truncating text vs hiding it#

A formula cuts the text for real; formatting only hides it. If text just spills into the next column on screen, you may not need a formula at all. Excel stops the overflow when the cell to the right is not empty, and turning on Wrap Text keeps the text inside its own column. The full text is still in the cell.

Use a formula when the shorter text itself matters, such as an export with a character limit or a label template. To stop long entries in the first place, use Data > Data Validation, set Allow to Text length, choose less than or equal to and enter the maximum.

Note that TRUNC is not a text function. It cuts decimals off numbers: =TRUNC(3.789,1) returns 3.7. On text, it returns #VALUE!.

How to replace the original text with the truncated version#

Formulas need the original column to keep working. To keep only the short version:

  1. Write the formula in a helper column and fill it down (Windows: Ctrl+D; Mac: ⌘D).
  2. Copy the results with Ctrl+C (Mac: ⌘C).
  3. Select the original column and use Home > Paste > Values.
  4. Delete the helper column.

Keep a copy of the full text somewhere first if there is any chance you'll need it again.

Practise it#

Truncating text is LEFT and LEN working together, with & for the dots. Practise LEFT, RIGHT, MID and LEN in a live spreadsheet: you type each formula and it checks it instantly. Then practise joining text with &, CONCAT and TEXTJOIN to build labels from the pieces you cut.

Try it yourself

This is a live spreadsheet. Type the formula in the green cell and press Enter.

Product names must fit a 20-character label. In B2, use IF, LEN and LEFT to keep names of 20 characters or fewer as they are, and cut longer ones to 17 characters plus "...".

fx
ABCD
1
Product name
Label
2
Wireless ergonomic keyboard with palm rest
3
USB-C charging cable, 2 m
4
Desk lamp
5
Noise-cancelling headphones
6
7
8

Tip: The test is LEN(A2)>20. If it is true, join LEFT(A2,17) and "..." with &. If not, return A2.

Practise this in a lesson

LessonLEFT, RIGHT, MID and LENSplit product codes and IDs into their parts by taking characters from the start, end or middle of the text.LessonJoining text: &, CONCAT and TEXTJOINBuild full names, addresses and tag lists by joining text with &, CONCAT and TEXTJOIN.Function guideLEFTPull the first characters from a cell with Excel's LEFT: prefixes, initials and first names. Examples, pitfalls and live practice.Function guideLENCount characters with Excel's LEN: check length limits, find stray spaces and count commas with SUBSTITUTE. Examples and a live exercise.

Frequently asked questions

How do I limit the number of characters in an Excel cell?

+

To shorten existing text, use =LEFT(A2,20) in a new column. To stop people typing too much, use Data Validation with Allow set to Text length and a maximum, such as 20.

Can I use TRUNC to truncate text in Excel?

+

No. TRUNC cuts decimals off numbers, for example =TRUNC(3.789,1) returns 3.7. For text, use LEFT to keep the start or RIGHT to keep the end.

How do I remove the last few characters from text in Excel?

+

Use LEFT with LEN minus the number to remove: =LEFT(A2,LEN(A2)-4) removes the last 4 characters, so INV-2041-OLD becomes INV-2041.

How do I replace the original text with the truncated version?

+

Write the formula in a helper column, copy the results, then paste them over the original column as values with Home, Paste, Values. Delete the helper column afterwards.

Sources

  • LEFT, LEFTB functions - Microsoft Support
  • LEN, LENB functions - Microsoft Support
  • TEXTBEFORE function - Microsoft Support

Written and checked by the ExcelReady Team. First published November 2, 2026. The practice exercise runs in the same formula engine as our lessons. Found a mistake? Read our editorial policy or email hello@excelready.app.

On this page

  1. How to truncate text with LEFT
  2. How to check the length first with LEN
  3. How to truncate text and add an ellipsis
  4. How to truncate text at a whole word
  5. How to remove the last few characters
  6. Truncating text vs hiding it
  7. How to replace the original text with the truncated version
  8. Practise it

Keep reading

Text· 6 min read

LEFT, RIGHT and MID in Excel: Pull Out Part of a Cell

LEFT, RIGHT and MID pull part of the text out of a cell. LEFT(text, num_chars) takes characters from the start, RIGHT(text, num_chars) takes them from the end, and MID(text, start_num, num_chars) takes them from any position. For TX-ELC-40512, LEFT(A2,2) gives TX, MID(A2,4,3) gives ELC and RIGHT(A2,5) gives 40512.

Text· 7 min read

Count Characters and Words in a Cell in Excel

To count characters in a cell, use =LEN(A2). It counts every letter, digit, space and symbol. To count one character, subtract the length without it: =LEN(A2)-LEN(SUBSTITUTE(A2,",","")). To count words, count the spaces in the trimmed text and add 1: =LEN(TRIM(A2))-LEN(SUBSTITUTE(TRIM(A2)," ",""))+1.

Text· 6 min read

Remove the First or Last Characters in Excel

To remove the first character in Excel, keep everything except it: =RIGHT(A2,LEN(A2)-1). LEN counts the characters and RIGHT keeps all but one from the end. To remove the last character, use =LEFT(A2,LEN(A2)-1). Change the 1 to any number to remove more characters, for example =RIGHT(A2,LEN(A2)-3).

More on text

  • How to Add Text to the Start or End of Cells
  • Capitalize Only the First Letter in Excel (Sentence Case)
  • Change Case in Excel: UPPER, LOWER and PROPER
  • CHAR Function in Excel (and CODE): Find Odd Characters
  • Clean Messy Data in Excel With TRIM, CLEAN and PROPER
  • Combine a Date With Text in Excel (Without Numbers)
All text articles →

Don't just read about Excel. Do it.

Practise real formulas in a live spreadsheet with instant feedback, right in your browser. Nothing to download.

Start learning for free