J
Jake Marx
Hi Stuart,
You're running into issues caused by floating point calculations (from the
multiplication operations). To avoid issues, you could try something like
this:
Sub GreaterThan2DecPlaces()
Dim rng As Range
Dim sNum As String
For Each rng In Selection.Cells
If Abs(rng.Value - Round(rng.Value, 2)) Then
Debug.Print rng.Address
End If
Next rng
End Sub
You're running into issues caused by floating point calculations (from the
multiplication operations). To avoid issues, you could try something like
this:
Sub GreaterThan2DecPlaces()
Dim rng As Range
Dim sNum As String
For Each rng In Selection.Cells
If Abs(rng.Value - Round(rng.Value, 2)) Then
Debug.Print rng.Address
End If
Next rng
End Sub