04-07-2016
09:22 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
04-07-2016
09:22 AM
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.