1.先设置单元格为 保留2位小数。

 

2.判断单元格内容

Dim line1 as single

Dim line2 as single

If Cells(2,2).Value = "" Then

  line1 = 0

Else 

  if Not IsNumeric(Cells(2, 2).Text) Then

    MsgBox "Input Data Error!"

  End if

  line1 = Cells(2,2).Value

End if

 

相关文章:

  • 2021-12-31
  • 2021-11-27
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-06-22
  • 2022-12-23
  • 2021-07-25
  • 2021-05-16
  • 2021-12-12
相关资源
相似解决方案