-
Somehow I am not able to do the following.
Delete any duplicate numbers out of a small one dim.array.
The numbers are no more the 5 digits in length and the array is not sorted nor does it have to be.
I just want to remove the duplicate numbers..
Thanks in advance..
Trent
-
Is there a fixed amount of elements in your array or can it be redimensioned??
-
It was set up dynamic as:
Dim rpp() As Integer
Then set up like this once I knew how many records I was going to process..
ReDim Preserve rpp(intrecCount)
-
As a suggestion, why don't you creat a new array and go through each item of your old array and only add it to the new array if it doesn't already exist.
-
Is the range of the values small? If you have a reasonable amount, then you could create a value table and then make a single loop checking for each value and then start copying the values over larger intervals backwards each time you find a duplicate. It's a lot faster than going trough the loop over and over again.