Comparison of Double Values

How do i compare two double values – I have one variable of type double 3.48 and another variable fo type double 5.678. Now I need to compare the two and make the bot take a set of actions depending on the result – I have tried using < and > operators, but it doesnt work


Try like this in IF Condition.

                 IF CDbl(3.48) < CDbl(5.678)

Yeah it works Lakshman,

Is there any way to check if a particular double value lies in between a range an get the result as bool?

for eg – My intention is to check if the value 1.8 lies in between 3.48 and 5.678 and flag the result.


Try this:

                      IF CDbl(3.48) < CDbl(1.8) AND CDbl(1.8) < CDbl(5.678)

ive used this, my question is cant we use a direct function to compare against a range?


I don’t know any direction function to compare values. Do you have any direct function to do this ?

Hey shreyaank,

yes we can. The CompareTo() Method is doing it

Lookup here. :slight_smile: