How To Remove Leading or Trailing Space in Excel 2013

If you are working on importing text files & and you want to remove spaces in Excel i.e. unnecessary spaces whether they are leading spaces in Excel or trailing spaces in Excel, then it is a must read article for you.

In this article, we will learn how to remove leading & trailing spaces in Excel.


Following is the snapshot of data:




  • Text contains in column A has spaces in front & back.
  • In order to remove leading spaces in Excel, we can use Excel TRIM function. However, TRIM in Excel does not remove trailing spaces in Excel.
  • The formula is a combination of TRIM, CLEAN, SUBSTITUTE & CHAR functions.
  • In cell B2, the formula is =TRIM(CLEAN(SUBSTITUTE(A2,CHAR(160)," ")))




In this way, Excel remove spaces which are not required.


Download-How to Remove Leading or Trailing Space in excel-xlsx

Leave a Reply

Your email address will not be published. Required fields are marked *

Terms and Conditions of use

The applications/code on this site are distributed as is and without warranties or liability. In no event shall the owner of the copyrights, or the authors of the applications/code be liable for any loss of profit, any problems or any damage resulting from the use or evaluation of the applications/code.