Hi,

arr1() is an array consists of 9 different items as follows:

arr1(1) = “Red” , arr1(2) = “Blue”, arr1(3) = “Blue”, arr1(4) = “Yellow”, arr1(5) = “Red”, arr1(6) = “Red”, arr1(7) = “Blue”, arr1(8) = “Green”, arr1(9) = “Red”

I need the code which can create arr2() which should be an UNIQUE array, I mean it should be as follows: arr2(1) = “Red” , arr2(2) = “Blue”, arr2(3) = “Yellow”, arr2(4) = “Green”

Notes: arr1() items are not fixed (every time contains different Data) THEN the long of arr2() is not fixed (it depends on arr1() data)

Thanx in advance.

ray14

Try something along these lines

dimension arr2() ' allows it to be redimensioned

for each element of arr1

set found = false

loop through the elements of arr2

if arr1(x) = arr2(y)

set found = true

if not found

redeimension arr2 to current size +1

set max element of arr2 to arr1(x)

arr2 now has the unique values in arr1

mlmcc