I have two arrays........if an element is in both then dont transfer it to the "unique" array however, if it is in one and not the other then transfer it to the unique array. But for some reason the unique array is not increasing in size..........
ReDim unique_file_array(3, UBound(stdy_file_array1))
unique_file_array = stdy_file_array1
'For x = 1 To UBound(unique_file_array, 2)
'MsgBox (unique_file_array(1, x))
'MsgBox (unique_file_array(2, x))
'MsgBox (unique_file_array(3, x))
'Next x
MsgBox ("ubound unique is " & UBound(unique_file_array, 2))
For x = 1 To UBound(stdy_file_array2, 2)
match_found = False
For y = 1 To UBound(unique_file_array, 2)
If stdy_file_array2(1, x) = unique_file_array(1, y) Then
match_found = True
Exit For
End If
Next y
If Not match_found Then
MsgBox ("in not match found")
ReDim Preserve unique_file_array(3, (UBound(unique_file_array) + 1))
unique_file_array(1, UBound(unique_file_array) + 1) = stdy_file_array2(1, x)
unique_file_array(2, UBound(unique_file_array) + 1) = stdy_file_array2(2, x)
unique_file_array(3, UBound(unique_file_array) + 1) = stdy_file_array2(3, x)
End If
Next x
Bookmarks