Pet*_*rik 2 excel formatting numbers
是否可以在 Excel 数字格式中使用多个条件?
我需要以下内容:
number format
7000 7
125 0
-8054 (8)
-149 (0)
Run Code Online (Sandbox Code Playgroud)
当我使用时:
#,###, ;(#,###,)
Run Code Online (Sandbox Code Playgroud)
除非数字小于 -499,否则它会正常工作,显示为 (0)
我试过了
[>=0]#,###, ;[>-500]("0");(#,###,)
Run Code Online (Sandbox Code Playgroud)
这工作正常,但问题是当小于 500 0 的数字不显示时。
所以我尝试过:
[<500],"0" ;[>=0]#,###, ;[>-500]("0");(#,###,)
Run Code Online (Sandbox Code Playgroud)
但excel不能接受这种编号格式。有任何想法吗?
非常感谢!
虽然 Jean-Fran\xc3\xa7ois Corbett 对于问题的具体情况有正确的答案,但它没有回答 OP 的标题问题。
\nExcel(和相关电子表格软件)似乎有一个基本限制,即它只能在自定义数字格式中使用两个条件。显然,它在内部使用 4 种可能的显示类别:number condition 1、number condition 2、other number和text。设置自定义数字格式只能重新定义两个数字条件。您无法直接控制“其他”条件。
因此,描述自定义格式的条件选项可能更清晰的方法:
\n[condition 1]custom format 1;[condition 2]custom format 2;other number format;text format\nRun Code Online (Sandbox Code Playgroud)\n其中condition 1默认为>0和condition 2默认为<0.
| 归档时间: |
|
| 查看次数: |
5735 次 |
| 最近记录: |