In Excel, we can manage and store a large amount of data and there might be some mistakes while entering. Sometimes, we may leave some extra spaces while typing a sentence. In order to change them into proper text, we don’t have to check them manually. Instead, we can use the TRIM function. With the help of this function, we can quickly remove all the extra spaces in the spreadsheet.
In this article, we will help you to know the syntax, explanation, and examples to use the Excel TRIM function in your worksheet. Get an official version of MS Excel from the following link:
https://www.microsoft.com/en-in/microsoft-365/excel
Jump To
What is the TRIM Function?
TRIM is one of the built-in functions in Microsoft Excel. It comes under TEXT functions. We can use this function in our spreadsheet whenever we want to remove the extra spaces from our data. And it returns the result in the proper text format.
1) Syntax
- This is the basic syntax of the Excel TRIM Function.
=TRIM(text)
2) Arguments
- text – The input text that you want to remove extra spaces.
3) Motive
- This function will remove extra spaces from the input text.
4) Return Value
- It returns the proper text by removing extra spaces.
What Will TRIM Function Do?
As we said earlier, the TRIM function will remove all the extra spaces from the input values and returns the result as text. This function is categorized as “TEXT” in Excel. Let’s see an example scenario to make you understand it easily.
Step 1: For instance, we have come up with a set of questions and there are some extra spaces available between the words. In order to remove them quickly, we can use the Excel TRIM function.
Step 2: To eliminate the extra spaces, we need to apply the following formula in any cell where we want to get the result.
=TRIM(B3)
Step 3: Now, click on the Enter button to get the result.
Step 4: To fill down the remaining cells, you just drag down the first cell. It will auto-fill the remaining cells as shown in the below screenshot.
We hope that the given scenario helped you to understand the TRIM function. So, you can quickly remove the extra spaces from the range.
Kindly move to the below section, if you have any confusion regarding it. We have given a simple workable example to make it easy to understand.
Use TRIM with CLEAN Function
Here we will see how to use a TRIM function with a CLEAN function. So that, we can remove the extra spaces, line breaks, and non-printable characters.
1) In the following screenshot, we have given example sentences with extra spaces, and line breaks. In order to remove them, we will use the TRIM & CLEAN functions together.
2) In order to get the corresponding results, we need to apply the following formula.
=TRIM(CLEAN(B3))
3) Hit the Enter button to get the result, as shown in the below image.
4) To fill down the remaining cells, you just need to drag down the first cell. Excel will autofill the remaining cells with the TRIM function.
By doing so, you can quickly remove all unwanted extra spaces and non-printable characters from your data in the spreadsheet.
Citations
To understand the usage of the TRIM function, we have referred to the following articles. They helped us to know the purpose of this function. You can also check them out using the links: TRIM function[1], and What is trim in Excel?[2].
The Bottom Line
With the help of the given scenarios and examples, you can easily understand the purpose of the TRIM function in Excel and how to apply it in the spreadsheet. The screenshots help to learn it even easier. Drop your feedback in the below comment section. Thanks for visiting AawExcel. Keep Learning!!
If you want to know what people think about this TRIM Function of Excel, then we suggest you look for it on the Quora interaction webpage. From there you can get to know more about the Excel TRIM function. Here, we have provided the link to Quora’s official website.
Video Tutorial
The following video will show you how to use the Excel TRIM function in the spreadsheet with proper examples.
Read Ahead:
- How to Use Excel FLOOR.MATH Function?
- How to Use Excel FLOOR Function?
- How to Use Excel CEILING.PRECISE Function?
- How to Use Excel CEILING Function?
- How to Use Excel GCD Function?