Search code examples
google-sheetstext-formatting

Empty Space, Text Formatting, Google Sheets


When I use ="""" & TEXT("1468", "# ###") & """", "1 468" is returned. Perfect.

However, once 4 digits become 3 digits, I get an empty space at the beginning. " 468". Not perfect.

enter image description here

What text format can I use to avoid that empty space?


Solution

  • Just wrap the inner portion in TRIM( ):

    ="""" & TRIM(TEXT("468", "# ###")) & """"

    TRIM removes superfluous leading, trailing and interposed space characters.