Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
NSBowser
in reply to: pball

PBALL,

 

I've seen this come about a few other times where during comparisons some tiny decimal portion is attached to the end of a measurement (think .1046000000001)

As a result numerical equality comparisions fail. I've seen a few ways to handle this by adapting for a given tolerance threshold, such as the  EqualWithinTolerance command.

In the case of a Select Case operation (no pun intended) I would use a range to define each value, though we all know you shouldn't have to do this.

Here is a sample of what I would employ. It doesn't require a very large range, just enough to nullify the tiny discrepency.

 

	Case 0.10459 To .10461

Best of Luck

---------------------------------------------------------------------------------------------------------------------------------
If you find this reply helpful or insightful, please use the 'Accept as Solution' or 'Kudos' button below.