Compare two column with decimal variables from same excel

Installer(.exe or .msi):

License type(Free, Trial/License code):

Studio/Robot version:

Current behavior:


Good day ui community, need some expertise in these matters. I would like to compare two decimals variables from two seperate column of data. I need to do a comparison for each row of comparison. For eg, i need to compare cell A1 with cell B1. I need to check using a if condition to see whether A is bigger than B. However, i keep getting errors. This is what i have tried.
A1 B1
2.3 1.2
Read range. Output DataTable.
For each row in DataTable
Row(0) > row(1)
Then: message box
Else: message box

I have also tried to convert row(0) into decimals. Eg. Convert.todecimal.row(0)

Thank you for any kind help :slight_smile:


Try below expression in IF condition.

Cdbl(row(0).ToString) > Cdbl(row(1).ToString)

1 Like


Use convert.ToDouble(row(“A”).ToString) > convert.ToDouble(row(“B”).ToString)
You may check the attached xaml file
CompareDecimal.xaml (7.2 KB)


1 Like

Thank you for the help! Yes, it works now!

1 Like

Thank you. I used yours and tried too. Works well too! Thank you!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.