简体   繁体   English

空白空间、文本格式、Google 表格

[英]Empty Space, Text Formatting, Google Sheets

When I use ="""" & TEXT("1468", "# ###") & """" , "1 468" is returned.当我使用="""" & TEXT("1468", "# ###") & """"时,会返回"1 468" Perfect.完美的。

However, once 4 digits become 3 digits, I get an empty space at the beginning.但是,一旦 4 位数变成 3 位数,我会在开头得到一个空格。 " 468" . " 468" Not perfect.不完美。

enter image description here在此处输入图像描述

What text format can I use to avoid that empty space?我可以使用什么文本格式来避免那个空白?

Just wrap the inner portion in TRIM( ) :只需将内部部分包裹在TRIM( )中:

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

TRIM removes superfluous leading, trailing and interposed space characters. TRIM删除多余的前导、尾随和插入的空格字符。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM