How to Truncate Text in Excel Based on Character?

Sharing is caring!

Truncating text in Excel is useful when you want to shorten strings to a specific number of characters. Whether you’re cleaning data, formatting reports, or preparing files for import/export, knowing how to truncate text based on character length can save time and prevent errors.

In this guide, you’ll learn different methods to cut text by character length using Excel formulas and tools. We’ll explore built-in functions like LEFT, RIGHT, MID, LEN, and how to combine them effectively. These techniques work in all recent versions of Microsoft Excel.

Methods to Truncate Text Based on Character

There are several ways to truncate text in Excel. Let’s look at the most common and useful methods.

1) Using the LEFT Function

The LEFT function returns a specific number of characters from the start of a text string.

Syntax:

=LEFT(text, num_chars)
  • text: The string you want to cut.
  • num_chars: The number of characters you want to keep.

Example:

=LEFT(A2, 10)

This keeps the first 10 characters of the text in cell A2.

AB (Formula)
Microsoft Excel Guide=LEFT(A2, 10)
Product Description=LEFT(A3, 10)
Financial Report 2025=LEFT(A4, 10)

2) Using the RIGHT Function

If you need to keep characters from the end of a string, use the RIGHT function.

Syntax:

=RIGHT(text, num_chars)

Example:

=RIGHT(A2, 5)

This returns the last 5 characters of the string in cell A2.

AB (Formula)
Invoice#20250703=RIGHT(A2, 5)
ABCD12345678=RIGHT(A3, 4)

3) Using the MID Function

Use the MID function if you need to extract a substring from the middle of a string.

Syntax:

=MID(text, start_num, num_chars)
  • start_num: Position to begin extracting.
  • num_chars: How many characters to keep.

Example:

=MID(A2, 3, 5)

This returns 5 characters starting from the 3rd position.

AB (Formula)
AXB435HJK=MID(A2, 3, 5)

4) Truncate Text Without Cutting Words

To truncate a string without breaking a word, you’ll need to locate the last space character before the cutoff and cut the text accordingly.

Use this formula to truncate up to 20 characters without breaking a word:

=LEFT(A2,FIND("@",SUBSTITUTE(LEFT(A2,20)," ","@",LEN(LEFT(A2,20))-LEN(SUBSTITUTE(LEFT(A2,20)," ","")))))

Explanation:

  • This formula finds the last space within the 20-character limit and cuts the text at that point.
  • This is useful for preview text or summaries.

5) Using Text Truncation with IF Conditions

Sometimes you only want to truncate if the text exceeds a certain length. Combine LEN and IF like this:

=IF(LEN(A2)>15, LEFT(A2,15), A2)
  • If the text in cell A2 has more than 15 characters, it’s truncated.
  • If not, the full text remains.
AB (Formula)
Annual Sales Forecast=IF(LEN(A2)>15,LEFT(A2,15),A2)
Q2 Report=IF(LEN(A3)>15,LEFT(A3,15),A3)

6) Use Flash Fill for Quick Manual Truncation

Flash Fill in Excel can auto-complete patterns. If you type the shortened version in one cell, Excel can guess the rest.

Steps:

  1. In a new column, manually type a truncated version (e.g., only first 5 characters).
  2. Press Enter.
  3. Click the next cell and press Ctrl + E or go to Data > Flash Fill.

Flash Fill is useful for small datasets where formulas aren’t needed.

7) Truncate Text with Power Query

For larger datasets or automation, use Power Query to cut text strings.

Steps:

  1. Select your data and go to Data > Get & Transform > From Table/Range.
  2. In Power Query Editor, select the column.
  3. Go to Add Column > Extract > First Characters.
  4. Enter how many characters to keep.
  5. Click Close & Load.

Power Query doesn’t require formulas and is ideal for advanced tasks.

Dynamic Truncation Using Cell References

You can make your formulas more flexible by referencing the character limit from another cell.

Example:

=LEFT(A2, B1)

If B1 contains 12, this formula keeps the first 12 characters of A2. This makes your sheet easier to maintain and adjust.

AB (Limit)C (Truncated)
Sales Overview Q3 202512Sales Overvi

Combine Truncation with Other Excel Functions

You can use truncation inside other functions such as CONCAT, TEXTJOIN, or IFERROR to build complex formulas.

Example (Combine LEFT with CONCAT):

=CONCAT(LEFT(A2,10), "...")

This adds ellipses after the truncated text to show that content has been cut.

Example (Truncate Email Usernames):

=LEFT(A2, FIND("@", A2)-1)

Extracts the username before the @ symbol in email addresses.

AB (Username)
john.doe@email.comjohn.doe
marketing@company.orgmarketing

Truncating Text in Multiple Cells at Once

To apply truncation to a range:

  1. Write the formula in the first cell (e.g., =LEFT(A2, 8)).
  2. Drag the fill handle down to apply it to other cells.

Alternatively, use array formulas in newer Excel versions:

=LEFT(A2:A10, 8)

This automatically fills the column with truncated text (in Excel 365 or 2021).

Limitations of Text Truncation in Excel

  • Formulas recalculate when source text or character limits change.
  • Truncated text loses information unless the full version is stored elsewhere.
  • Multi-byte characters (like Chinese or emojis) can affect character count.
  • Flash Fill and Power Query are manual steps unless automated.

Final Thoughts

Truncating text in Excel is simple with functions like LEFT, RIGHT, and MID. These formulas give you control over how much text to keep and where to cut. You can combine them with logic functions like IF and LEN, or use tools like Flash Fill and Power Query for more automation.

Knowing when and how to truncate based on characters helps you format data professionally, prepare files for upload, or clean entries quickly. With these tools in hand, your Excel workflow becomes smoother and more efficient.

FAQS

Can I use the TRUNC function to shorten text in Excel?

No, the TRUNC function only works with numbers. It removes decimal places, not characters from text. To truncate text, use functions like LEFT, RIGHT, or MID.

How do I truncate text in Excel without breaking words?

To avoid breaking words, you can use a formula that finds the last space within a character limit using SEARCH or TEXTBEFORE. These methods ensure full words are preserved in the result.

What function should I use to get the first few characters from a string?

Use the LEFT function. For example, =LEFT(A2, 10) will return the first 10 characters from the text in cell A2.

Can I truncate text dynamically based on another cell’s value?

Yes, you can reference a cell that contains the character limit. For example, =LEFT(A2, B1) will truncate the text in A2 to the number of characters specified in B1.

Is there a way to truncate text visually without changing the actual value?

Yes, you can visually truncate text by adjusting column width and turning off text wrap. You can also use custom number formatting like @… to simulate truncation for display purposes only.

Which Excel versions support the TEXTBEFORE function?

TEXTBEFORE is available in Excel 365 and Excel 2021. It allows easy extraction of text before a specified character, which is helpful for truncating strings without breaking words.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *