VBA 代码Function REMOVEPOINT(ByVal Number As Double) As Double Do While Number <> Int(Number) Number = Number * 10 Loop REMOVEPOINT = NumberEnd Function然后在单元格中输烂激入=REMOVEPOINT(3.145)但是用浮点数计算不免会有精度误差,所以最好用这种方饥扰袜法:Function REMOVEPOINT(ByVal Str As String) As String REMOVEPOINT = Replace(Str, ".", "")End Function然后在单元格中输入=REMOVEPOINT("3.145")或=REMOVEPOINT(3.145)都行,就是要注意返回的是字李慎符串 "3145"
相关文章
-
excel表格不能直接打印,print_area,是否中病毒?
2023-06-19 19:59 阅读(650) -
excel怎么使用
2023-06-11 22:49 阅读(596) -
excel中乘法函数是什么?
2023-06-10 19:58 阅读(586)
1 Excel 请问Arr = CurrentRegion 是什么意思
603 阅读
2 excel中如何计算公式
627 阅读
3 excel表格求和怎么操作
575 阅读
4 excel表格如何分类汇总
579 阅读
5 excel下拉列表怎么设置
563 阅读