In this lesson you can learn how to use TRIM function.
Thanks to TRIM function you can remove spaces from the text.
Syntax of TRIM function is:
If you have text with extra spaces in A1 cell, just writhe a formula =TRIM(A1). TRIM function remove extra spaces which you doesn't need.
You can also use TRIM function with other functions.
Example 1 Remove extra spaces in Excel
To remove spaces you don't need just use TRIM function. Use this simple formula.
Example 2 Extract text after the last full stop in a text string
You want to extract text after the last string. Just use the formula below with TRIM function.
Of course you can modify this formula. If you have problem with other character (eg. question mark) just change full stop with this character in formula.
If your string text is longer than 10 just incease it.
Example 3 Finding word in a long sting of text
You want to find some word in a long string of text and you don't know how to do it? Try this formula:
Just replace WORD to your text.
If you want to get a text without WORD string just change formula to:
These 2 above formulas should work also without TRIM function. Use them with TRIM function to work better and always fine.
Example 4 Find exact value in cell
Task is to find exact value in the cell. It means that when you wany to find '15', Excel will find you only cells with '15', but not with '1515', '215', '150'...