Are you frustrated at the prospect of manually removing leading and trailing spaces from data? There is absolutely no need to worry, because by using the Trim function the wasteful and inefficient method of painstakingly removing leading and trailing spaces from data can be eliminated. Assuming you have imported data with leading and trailing spaces into Excel, in this tip we show you how your data can easily be cleaned.
Applies To: Excel 2003, 2007, 2010
1. For this tip, the screen shot below will be used as an example
2. Select cell C2 and type: =Trim(B2)
3. Press enter and copy the formula down
The leading spaces have been removed from the data after using a simple Trim function. No need to waste time by manually removing leading spaces.
Alchemex provides examples of MS Excel procedures for illustration only, without warranty expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose. The MS Excel procedures on this web site are provided “as is” cannot be guaranteed that they can be used in all situations