Hello! First of all I want to mention that I'm new both to VBA and this forum. So, I'm having some problems in a project I'm working at. I have a project that requires me to compare a fixed length array to a dynamic array.
The thing is though, i want to compare each element of the first array with every element of the second array, and if i get a match do something, and delete the matched elements from the second array. Then, again, compare them, see that there are no matches, calculate the difference between the first element of the first array and the first element of the second array, and add it to all of the elements of array 1, therefore equalizing them so that they can be deleted once more. And so on... i'm gonna do an example below, because i don't know if i made any sense.
A1=(0,50,100,150)
A2=(0,100,150,200,250,300,350)
after comparison, 0=0, 100=100, and 150=150 => do something, then recreate the elements:
A1=(0,50,100,150)
A2=(200,250,300,350)
compare them again, there are no matches, so add 200(elem1-elem1 of each array) to the first array=>
A1=(200,250,300,350)
A2=(200,250,300,350)
now that i have a match, all element can be deleted, so the second array will be emptied . Basically, the first array empties the second one step by step, by equalizing the elements.
This is what i have so far (the testArray is being filled up after user input):
So, after finding the duplicate values, and removing those elements ONLY from the 2nd array, i should make an addition to the first array, such that i would cause 2 other duplicates, and do this over and over again, until i've removed all of the 2nd array's elements...
Please help me.
Thank you!
Bookmarks