문제

I have a strange issue with the Round() VBA function. When I try rounding any input in scientific notation it always returns zero:

? Cells(3, 34).Value

8,77796901893289E-02

? Round(Cells(3, 34).Value, 0)

0

? Round(8.777, 0)

9

Any clues how to make it work?

도움이 되었습니까?

해결책

8,77796901893289E-02 equals 0,0877796901893289, so it would round to zero.

다른 팁

I think the issue you are running into is that round deals with "number of digits" not significant figures.

This number of digits refers to number of decimal points. The image below shows the example from the help file.

enter image description here

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top