i want to test different set of elements in the array by looping.
Do you know which set of elements you want to check?
In the example you wanted to look at 0,1 and 9.
Are there other sets of specific indexes to check?
Are there always exactly 3 indexes in the set?
Put the indexes in a 2 dim array with each row containing the 3 indexes to be checked.
Then use the contents of that array to check the other array.
NormR1
Posting Expert
6,677 posts since Jun 2010
Reputation Points: 1,138
Solved Threads: 656