First, download the Excel Space Trimmer and install then, follow the steps below:
How to delete excess spaces in Excel: 3 easy steps
1. In your Microsoft Excel worksheet, select the cells, columns or rows from which you want to remove excess spaces.
2.Start the Trim Spaces by clicking on its icon, or go to the Excel Ribbon Ablebits.com -> Trim Spaces for Excel.
3.Click the "Run" button and enjoy the results!