vb中数据类型 两个double类型的数据相除返回结果如果是很大的小数总是溢出怎么办?

Dim x As IntegerFor x = 5 To 14
Dim y As IntegerFor y = 51 To 60
Dim z As Double
z = (Cells(y, 12) / (((Cells(y, 8) + Cells(y, 9) + Cells(y, 10) + Cells(y, 11)) / 4))) - 1
If z > 0.1 Then
Cells(x, 1) = Cells(y, 1)Cells(x, 2) = Cells(y, 2)Cells(x, 3) = Cells(y, 3)
End If
NextNext
End Sub

可以用round来显示指定的小数点。

round(num1,5)

追问

什么意思?没看懂。。。。

温馨提示:答案为网友推荐,仅供参考
第1个回答  2014-10-30
上csdn上找找
相似回答