Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想删除单元格中数字的小数部分,但是当我将小数分隔符设置为“0”时,它也会对数字进行四舍五入。我想要的是,如果我的号码是 3.99,我希望看到 3,但它会将其四舍五入为 4。有没有办法做到这一点?谢谢
你想要的不是格式化数字,你真正想要的是四舍五入:
Math.Floor( 3.99 ) ' That gives 3
Format 总是将数字四舍五入到最接近的值,这意味着带有“#”格式的 3.99 将给出 4。