Remove spaces in Excel with the TRIM function If you want to remove the extra spaces in a cell, there is a function for that ; it's the TRIM function. But you must convert your formula in values.