This Excel function removes leading and trailing spaces from text within a cell or string. The function will not remove single spaces between any words. The function is often used when dealing with data from another application where extra spaces may have been added to the end.