Yes, you can shorten or trim text in Excel quickly using built-in functions like LEFT, RIGHT, TRIM and LEN, or the Flash Fill feature. Whether you want to cut every cell down to a fixed number of characters, remove extra spaces, or extract just part of a string, Excel handles it without any add-ins. This guide covers the safest, most reliable methods for Excel on Windows and Mac; exact menu labels can differ slightly between versions.

What You'll Need

  • A spreadsheet in Excel (desktop version for Windows or Mac; most functions also work in Excel for the web)
  • Your text data in a column or row
  • A few minutes - no add-ins, macros or special tools required

Step-by-Step

  1. Back up your data first. Before changing text, copy the original column to a spare sheet or save a copy of the file. Some operations overwrite data permanently.
  2. Choose the right function for the job. To cut text down to a set number of characters from the start, use LEFT. To keep characters from the end, use RIGHT. To grab characters from the middle, use MID. To remove leading/trailing spaces, use TRIM.
  3. Enter the formula in a helper column. Click the empty cell next to your first text entry. For example, if your text starts in cell A2 and you want only the first 10 characters, type: =LEFT(A2,10) and press Enter.
  4. Fill the formula down. Click the cell with the formula, then double-click the small square fill handle in the cell's bottom-right corner. Excel copies the formula down alongside your data. Alternatively, drag the fill handle down manually.
  5. Remove spaces to shorten text. If your text has extra spaces, use =TRIM(A2). This removes leading, trailing, and repeated spaces between words, which often shortens the visible content considerably.
  6. Try Flash Fill for pattern-based shortening. In the column next to your data, type the shortened version of the first entry by hand (for example, the first word only). Press Enter, then press Ctrl+E (Windows) or Command+E (Mac) - or go to Data > Flash Fill. Excel detects the pattern and fills the rest. Always review the results, as Flash Fill guesses patterns and can get them wrong.
  7. Replace the original text (optional). Once you are happy with the helper column, select it, copy it (Ctrl+C), then right-click the original column, choose Paste Special > Values, and delete the helper column. This converts formulas into plain text so the shortened values stay fixed.
  8. Check your results. Use =LEN(A2) in a spare cell to count characters in a cell and confirm the lengths are what you expected.

Common Mistakes

  • Overwriting the original column immediately. Always shorten into a helper column first so you can compare and undo if needed.
  • Forgetting to paste as values. If you delete the source column while formulas still reference it, you will get #REF! errors. Paste Special > Values first.
  • Assuming Flash Fill is always right. It predicts patterns; a slightly different entry can produce wrong results. Spot-check the whole column.
  • Confusing TRIM with deleting all spaces. TRIM keeps single spaces between words; it only removes extras. To remove all spaces, use Find & Replace (Ctrl+H), type a space in Find what, leave Replace with empty, and click Replace All.
  • Ignoring non-breaking spaces. TRIM does not remove character code 160, which is common in text pasted from web pages. Use =TRIM(SUBSTITUTE(A2,CHAR(160)," ")) for those.

Tips

  • Combine functions for precision. To remove the last 3 characters from A2, use =LEFT(A2,LEN(A2)-3).
  • Extract text before a delimiter. To keep only text before the first space: =LEFT(A2,FIND(" ",A2)-1), or use TEXTBEFORE(A2," ") in newer Excel versions.
  • Wrap results in TRIM. Formulas like =TRIM(LEFT(A2,10)) can leave a trailing space; trimming the output keeps everything clean.
  • Format cells instead of editing text. If you only want text to look shorter on screen without changing it, you can shrink it to fit (Home > Format > Format Cells > Alignment > Shrink to fit) or wrap it (Wrap Text on the Home tab). The underlying data stays intact.
  • Work on a copy for big datasets. With thousands of rows, a mistake filled down can be tedious to reverse even with Undo.

Troubleshooting

  • Formula returns a #VALUE! error: the referenced cell probably contains an error or a value the function cannot read. Check the source cell, or wrap the formula in IFERROR, e.g. =IFERROR(LEFT(A2,10),"").
  • Flash Fill does nothing: make sure you have typed an example directly next to the data column, with no blank column in between. If it is still not working, check File > Options > Advanced > Automatically Flash Fill is enabled (Windows). You can always trigger it manually with Ctrl+E.
  • Results show the formula text instead of the value: the cell is probably formatted as Text. Change the cell format to General (Home tab), then re-enter the formula.
  • Spaces will not go away: you are likely dealing with non-breaking spaces (CHAR(160)). Use the SUBSTITUTE formula in the Common Mistakes section, or run Find & Replace after copying a non-breaking space into the Find box.
  • Everything looks right but pasted values changed: you may have pasted formulas over themselves. Undo (Ctrl+Z) and repeat the Paste Special > Values step carefully.
  • Numbers turned into text after shortening: functions like LEFT always return text. If you need numbers, wrap the formula in VALUE(), e.g. =VALUE(LEFT(A2,5)).

Frequently Asked Questions

How do I limit text to a certain number of characters in Excel?

Use a formula such as =LEFT(A2,20) to keep the first 20 characters. To prevent users typing longer text in the first place, select the cells, go to Data > Data Validation, choose Text length, set the maximum, and add a warning message.

Can I remove the last N characters from every cell?

Yes. Use =LEFT(A2,LEN(A2)-N), replacing N with the number of characters to drop. In newer Excel versions you can also use TEXTBEFORE or a delimiter-based approach.

Does shortening text with formulas change the original data?

No. Formulas create new values in the cells where you enter them. The original text is only replaced if you deliberately paste the results over it.

Why does TRIM not remove all the spaces in my cells?

TRIM removes leading, trailing and repeated normal spaces but not non-breaking spaces (character 160) or other invisible characters. Combine it with SUBSTITUTE and CHAR(160), as shown above.

Is there a way to shorten text without formulas at all?

Yes - Flash Fill (Ctrl+E) learns from an example you type, and Find & Replace (Ctrl+H) can strip specific characters or spaces. Neither requires writing a formula, though both deserve a quick review of the results.