If you need to truncate text in Microsoft Excel, there are a few different ways to do it. The easiest way is to use the Truncate Text command on the Home tab of the ribbon. This command allows you to truncate text up to a certain number of characters, or to a specific length. You can also use the Cut and Paste commands on the Home tab of the ribbon. This will allow you to cut and paste text as well as truncate it. Finally, you can use the Text Box tool on the Home tab of the ribbon and select Truncate Text from the drop-down menu. ..
If text is a big part of the data in your spreadsheet, you may need to adjust it to fit properly. The TRUNC function in Microsoft Excel works only with numbers. So if you want to truncate text, here’s how.
There are many useful functions for working with text in Excel. Three of those functions help you truncate text in a cell. These are RIGHT, LEFT, and MID, and each has a variation for using bytes instead of characters.
Truncate Text in Excel with RIGHT or RIGHTB
The RIGHT function uses the number of characters for a single-byte character set (SBCS) while RIGHTB uses a number of bytes for a double-byte character set (DBCS). Both functions work the same way with only that difference. So, you can use whichever works best for you.
RELATED: How to Count Characters in Microsoft Excel
The syntaxes are RIGHT(text, number_characters) and RIGHTB(text, number_bytes) with the first argument for each formula required. You can enter the cell reference and keep what’s on the right.
To keep 12 characters on the right from the text string in cell A2, you would use this formula:
As another example, we want to keep only the last word and punctuation. This formula retains the last eight characters on the right.
Truncate Text in Excel with LEFT or LEFTB
The LEFT and LEFTB functions work like the RIGHT and RIGHTB functions where you use either the number of characters or bytes respectively. But with these functions, you’re shortening your text string from the opposite side.
RELATED: 12 Basic Excel Functions Everybody Should Know
The syntaxes are LEFT(text, number_characters) and LEFTB(text, number_bytes) with the first argument for each formula required. Again, insert the cell reference for the text and keep what’s on the left side.
To keep 32 characters on the left from the text string in cell A2, you would use this formula:
For another example, we want to keep only the first word in the string. This formula retains only the first four characters on the left.
Truncate Text in Excel with MID or MIDB
If the text that you want to keep is in the middle of a text string, you’ll use the MID or MIDB functions. These functions are like the other two in that you enter a number or characters for MID and number of bytes for MIDB.
RELATED: How to Shrink or Expand Cells to Fit Text in Microsoft Excel
The syntaxes are MID(text, start, number_characters) and MIDB(text, start, number_bytes) with all arguments for each formula required. You can use a cell reference for the first argument, the number of the starting character or byte for the second, and the number to keep for the third.
Here, we’ll remove everything from the string except for a middle portion. With this formula, the text is in cell A2, we want to start with the 35th character, and keep only 24 characters.
As another example, using the following formula you can shorten the text in cell A2 and keep only the second word. We use 6 for the start argument and 3 for the number_characters argument.
Shortening text in your sheet may be necessary or simply something you prefer. These functions and formulas help you truncate text in Excel from the right, left, or middle, as you need it.