Excel Functions

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 :

TRIM(text)

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:

Excel TRIM function

 

How to Change Case-

Lower/Upper Case

The example below shows how to convert a text string to lower & upper  case in Excel.

1. Use the LOWER function to convert all letters in a text string to lowercase.

Lower Function in Excel

2. Use the UPPER function to convert all letters in a text string to uppercase.

Upper Function in Excel

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.

  1. 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.

    Empty column for entering formula

    In cell B2, type =PROPER(A2), then press Enter.
    PROPER function in cell B2

    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.

  2. 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.
    Small black square for filling down the formula