How to Use Trim Function in Excel | Step-by-Step Tutorial & Quiz

preview_player
Показать описание
A person typing data in the cells of an Excel worksheet may inadvertently include a space before and or after a word or phrase. When you import text into an Excel worksheet, the source itself may have spaces. Whatever the reason for the space(s), use the TRIM function in Excel to remove them.

The TRIM function in excel helps you get the accurate length of a word or phrase or character string, say for use in other Excel functions. The TRIM function removes the space(s) before and or after a word or phrase in a cell.

Let's consider an example: Say there is a word, Sales in cell A1. The length of this word is 5. That is, it has five characters. Assume there is a space before and after this word. Now, the word length is 7. It is not accurate because of the spaces. To get the correct length of the word, you should use the TRIM function.

The format of the TRIM function is: TRIM(text). You can replace "text" with a cell reference. Let's use the above example again. In an empty cell, you would type the function as: =TRIM(A1). Now, the word length of A1 or Sales will be 5.

How to use TRIM function in Excel? Here are the steps:

1. Start Excel.
2. Open or create a worksheet with words or phrases with spaces before and or after the text.
3. Click on an empty cell, say B1.
4. Type "=tr" (without quotes).
5. Click the cell which has text with spaces, say A1, and press Enter. Excel removes the spaces from the text in A1 and inserts the text into the cell, B1, with the TRIM formula.

TIP

To remove spaces in text, say in A2 to A10, click B1 (which has the TRIM function). Click and drag the corner point till B10 and release. Excel removes the spaces in cells A2 to A10 and inserts the text into the cells B2 to B10.

--------------------------------------------------------------------------------------

PowerPoint Videos

You may be interested in these PowerPoint Courses:

Font size for PowerPoint Presentation

How to Improve PowerPoint Presentation

PowerPoint Tips

--------------------------------------------------------------------------------------

MS Word Videos

You may be interested in these Word Courses:

How to Create a Drop Cap in MS Word
Рекомендации по теме
welcome to shbcf.ru