TRIM

TRIM(text)

Returns the text string with all extra spaces removed from the beginning, middle and end.

textThe text string you want cleaned.

REMARKS
* Extra spaces can prevent your formulas from working correctly.
* The only spaces left will be a single space between words.
* If words have more than one space between them, they are replaced with a single space.
* This function will only remove the ASCII space character (32) and not any other characters.
* You can use the CLEAN function to return a text string with all the non-printable characters removed.
* You can use the LEFT function to return the left most characters in a text string.
* You can use the MID function to return the characters from the middle of a text string.
* You can use the RIGHT function to return the right most characters in a text string.
* The equivalent VBA function is VBA.TRIM
* For the Microsoft documentation refer to support.microsoft.com
* For the Google documentation refer to support.google.com

 A
1=TRIM(" Better     Solutions ") = "Better Solutions"
2=TRIM(" double  space ") = "double space"
3=TRIM("  triple   space  ") = "triple space"
4=TRIM("right     ") = "right"
5=TRIM("     left") = "left"
6=TRIM("   left     right   ") = "left right"
7=TRIM("   Microsoft Office     Development   ") = "Microsoft Office Development"

1 - What does the text string " Better     Solutions " look like with all the extra spaces removed.
2 - What does the text string " double  space " look like with all the extra spaces removed.
3 - What does the text string "  triple   space  " look like with all the extra spaces removed.
4 - What does the text string "right     " look like with all the extra spaces removed.
5 - What does the text string "     left" look like with all the extra spaces removed.
6 - What does the text string "   left     right   " look like with all the extra spaces removed.
7 - What does the text string "   Microsoft Office     Development   " look like with all the extra spaces removed.

© 2022 Better Solutions Limited. All Rights Reserved. © 2022 Better Solutions Limited Top