Compare Numerics

Hi Team,

I am trying to run the below scenario but not working
If variable value falls between 30,00,000 and 10,000,000
it should display message as commission is 10%
If less than 30,00,000 then 5%
Value can be in string or integer.
Kindly provide a sample code

@Balan

Store the data in a variable as `variable = Cint(Extracted data)` and variable type must be an Int
Then use the if condition as `variable>=300000 and variable<=1000000` so in then sequence print as commission is 10% and in else sequence print as commission is 5%

Excel_Testing.xaml (9.9 KB)

Regards

@Balan

Take if

Var_Value>=30,00,000 and Var_Value<=10,000,000

Assign
Comission=10%

Else
Comission=5%

Hi @Balan

Take an else if condition write like below
Cint(Variable) < 3000000
then Commission is 5%
Cint(Variable)>3000000 and Cint(Variable)<10000000
then Commission is 10%

Find the below workflow.

Hope it helps!!

Hi @Balan

Title: “Enter Value”
Result: inputValue

To: numericValue
Value: Convert.ToInt32(inputValue)

Condition: numericValue >= 10000000 AndAlso numericValue <= 30000000

4. Inside the If activity, add Assign activity:
To: message
Value: “Commission is 10%”

5. Add an Else If activity:
Condition: numericValue < 10000000

6. Inside the Else If activity, add Assign activity:
To: message
Value: “Commission is 5%”

Inside the Else activity, add Assign activity:
To: message
Value: “Commission percentage is not defined for this value.”

Hope it helps!!

Hi @Balan

Check on this

Regards,

keep assign activity and put
Str_output= if(Cint(yourValue)<3000000,“Commission is 5%”, “Commission is 10%”)

Hi @Balan ,
My solution :

Regards,