Excel Custom Decimal Number Format Trailing Dot [closed]

萝らか妹 提交于 2019-12-05 19:22:23

You can use conditional formatting to do this, in Excel 2007 and later, I believe. Format the cells with your custom format of #0.#### as you've already done. Then add custom formatting to use the General Format if the cell value has no decimal portion.

In the Condtional Formatting dialog add a formula-based format. In the "Format values where this formula is true" box enter:

=INT(A2)=A2

In the Format Cells dialog click the Number tab and choose General as the format.

# are optional digits to show. 0 will enforce that digit even if it is zero. Make your number format #0.00##. This will display

  • 123 as 123.00
  • 123.00 as 123.00
  • 123.000 as 123.00
  • 123.001 as 123.001
  • 123.001111 as 123.0011
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!