Hello,
I have 2 sheets that need compare 1by1. if any cell is not equal will stop.
If 1 = 1’ (row1: 101.64.86050) true → 2=2’ → 3=3’ → 4=4’
1 = 1’ (row2: 114.35.36450) true → 2=2’ → 3=3’ → 4=4’
…
Check “OK” or “NO” at I(Result sheet)
I can get & compare values at 1& 1’ but another cell can’t get, always not equal. Thank all
DLV030_2.xaml (23.0 KB)
DLV030.xls (31 KB)
Hi @anh.nguyen
Follow below steps
- Use the “Excel Application Scope” activity to open your first sheet.
- Use the “Read Range” activity to read the data from your first sheet into a DataTable variable.
- Use the “Excel Application Scope” activity again to open your second sheet.
- Use the “Read Range” activity to read the data from your second sheet into a second DataTable variable.
- Use a “For Each Row” activity to loop through each row in the first DataTable.
- Inside the “For Each Row” activity, use an “If” activity to compare the cells in each row of the two DataTables.
- If any cell is not equal, set a boolean variable (e.g. “match”) to false and exit the “For Each Row” loop.
- If all cells match, set the “match” variable to true.
- Use the “Append Range” activity to write “OK” or “NO” to the result sheet, based on the value of the “match” variable.
Regards,
Kaviyarasu N
1 Like
In other hand use read range actions for read the two sheet value.
Use match function inside for each datatable actions

I add: CDbl(currentRow(“Số Lượng”))
Thank all
I think my problem if cell numbers it can’t compare