Fresh Excel Tips

Quick and Easy Excel Tips and Tutorials

How to Use the TRIM function to delete spaces in Excel

Today, we are presented with a tricky problem that we need to correct. In Column A, we have text that has spaces at both the left and right side of the text. This is a problem as we will be using this data for evaluation in other formulas. To correct this, we will be using the TRIM function to remove all spaces from a text string except for the single spaces between words. Here is how we’ll achieve this:

How to Delete spaces from the left and right of text:

  1. In cells A1:A5, type your text with spaces at the beginning and at the end.
  2. Select cells B1:B5 and type the following formula: =TRIM(A1).
  3. Press CTRL+Enter.

This tip should work in Excel 97, 2000, 2003 and 2007. You should now be set!

How to Use the TRIM function to delete spaces in Excel
  1. How to Separate Cell Values Using the Trim Function in Excel
  2. Using the PROPER function to change first letters to uppercase
  3. How to Determine the ASCII/Numeric Code using Excel
  4. How to Use the REPLACE function in Excel
  5. How to use the SUMPRODUCT function in a formula in Excel

Leave a Reply