+1 vote
1 view
in RPA by (12.8k points)

I'm learning AAE for like a week and I have problem with for loop in excel file. I have prepared table with Vendor Id, Material, and order Quantity:

Vendor  Material    Quantity

25000   1545454      100

64003   7854786     1024

25000   5896471      250

25000   3336661      900

64003   7854786     2048

25000   3336691      900

And I wanted to validate the table if there is any redundancy in the material and vendor column. I have created 6 variable 2 for each column and named them: POv, POm, POq and Vpo, Mpo, Qpo. And of course 2 itterators Itteraor2 and Itterator3 that I am incremanting in 2 loops

enter image description here

Problem is that my loop is infinite, while I wanted only to iterate 6 times (number of rows) and additionally it is messaging me that row 2 AND 3 have the same vendor ID and material ID what is not true. Could somebody tell me what is wrong and how to fix it?

1 Answer

+1 vote
by (29.8k points)
edited by

There are a few corrections to be made in the code:
1)For the inner loop, consider placing the variable operation between End If and End Loop.

Looking for RPA material from basics! Refer to this video on RPA provided by Intellipaat:

2) For the outer loop (before $iterator3$+1), ensure that the inner loop counter is set like this

$iterator2$= $iterator3$+1

so that it does not compare the previous rows again.

Related questions

+1 vote
1 answer
0 votes
1 answer
Welcome to Intellipaat Community. Get your technical queries answered by top developers !