1.

How Would You Get Rid Of Leading / Trailing / Double Spaces In A Text In Excel?

Answer»

To get rid of leading, trailing, and double spaces, you need to use the TRIM function.

For example, if you have a text string in CELL A1 and you want to remove the spaces, you can use the following formula:

=TRIM (A1)

Note that it doesn't remove SINGLE spaces between words.

Excel TRIM function does a GOOD job in removing spaces in Excel; however, it fails when you have non-printing CHARACTERS (such as line breaks) in your data set. To remove non-printing characters, you can use a combination of TRIM and CLEAN functions.

If you have some text in cell A1 from which you want to remove spaces, use the below formula:

=TRIM (CLEAN (A1))

To get rid of leading, trailing, and double spaces, you need to use the TRIM function.

For example, if you have a text string in cell A1 and you want to remove the spaces, you can use the following formula:

=TRIM (A1)

Note that it doesn't remove single spaces between words.

Excel TRIM function does a good job in removing spaces in Excel; however, it fails when you have non-printing characters (such as line breaks) in your data set. To remove non-printing characters, you can use a combination of TRIM and CLEAN functions.

If you have some text in cell A1 from which you want to remove spaces, use the below formula:

=TRIM (CLEAN (A1))



Discussion

No Comment Found