简体   繁体   English

像 Excel 一样显示不带小数的数字

[英]Display number without decimal as is Excel

I have a set of numbers I want to display without the decimal, but excel either rounds or excludes zeros.我有一组我想不带小数点显示的数字,但 excel 要么舍入要么排除零。

Example:例子:

Text I have 1.75, 0.6, 0.60, 8.0, 45.0文本我有 1.75, 0.6, 0.60, 8.0, 45.0

What I want 175, 06, 060, 80, 450我想要的 175, 06, 060, 80, 450

Thanks!谢谢!

With your current data, you can use:使用您当前的数据,您可以使用:

=SUBSTITUTE(TEXT(A1,"0."&REPT(0,RIGHT(CELL("format",A1),1))),".","")

在此处输入图片说明

If you actually have text to begin with and not numbers, then just use SUBSTITUTE :如果您确实有文本开头而不是数字,那么只需使用SUBSTITUTE

=SUBSTITUTE(A1,".","")

在此处输入图片说明

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

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