I have an Excel file that contains a list of values (val). The “val1” values are in column “B” and the val2s are in a table and more numerous. I run an iterative comparison process to compare the values.

I check if the value “val1” =val2. Then write “True” in column “C”. for example I compare the value of cell B2 and I write the result in column “C2”. The process increments automatically.

If the result is false then I write “false” in cell “C2”,…

My problem is that for example when I have to compare val1 which is unique to val2 which contains 20 values in the table. When it finds the correct result for example at position 10 of the table, it writes “True”, but it then continues the iteration up to 20 before moving on to the next val1 which is in cell “B3” of the excel table.

So the system crashes.

How can I resolve this little problem?

THANKS