Excel TEXT 函数在存在“*”时不填充单元格

问题描述 投票:0回答:1

我正在尝试在 Excel 中格式化数字,我想要的结果类似于会计格式,其中 $ 位于左侧,值位于右侧。我试图包含多个数字,因此我需要使用 TEXT 函数来转换每个数字并连接。

作为第一步,我尝试使用格式字符串

_‑$* #,##0.00_-
复制正数的会计格式的行为,但 $ 和数字之间从来没有任何空格。

Screenshot of Excel showing the issue described above. A1 has 200, A2 has a formula using the text function and format described above, but A2 displays with the dollar sign immediately before the number.

我的格式字符串是否有问题,或者我是否缺少某些 Excel 设置,导致 TEXT 函数无法在此处用空格填充单元格?

excel number-formatting
1个回答
0
投票

如果您想要在美元符号

$
之后有空格,请在格式参数内的
$
之后输入空格。我在下面的公式中使用了 3 个空格。

=TEXT(A1,"_‑$    * #,##0.00_-")

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.