TRIM function – remove extra spaces in Excel
You use the TRIM function in Excel removes extra spaces from text. It deletes all leading, trailing and in-between spaces except for single space characters between words.
The syntax of the TRIM function is :
Where text is a cell that you want to remove excess spaces from.
For example, to remove spaces in cell A1, you use this formula:
=TRIM(A1)
And the following screenshot shows the result:
How to Change Case-
Lower/Upper Case
1. Use the LOWER function to convert all letters in a text string to lowercase.
2. Use the UPPER function to convert all letters in a text string to uppercase.
In the example below, the PROPER function is used to convert the uppercase names in column A to proper case, which capitalizes only the first letter in each name.
- First, insert a temporary column next to the column that contains the text you want to convert. In this case, we’ve added a new column (B) to the right of the Customer Name column.
In cell B2, type =PROPER(A2), then press Enter.
This formula converts the name in cell A2 from uppercase to proper case. To convert the text to lowercase, type =LOWER(A2) instead. Use =UPPER(A2) in cases where you need to convert text to uppercase, replacing A2 with the appropriate cell reference.
- Now, fill down the formula in the new column. The quickest way to do this is by selecting cell B2, and then double-clicking the small black square that appears in the lower-right corner of the cell.