View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
John Michl John Michl is offline
external usenet poster
 
Posts: 81
Default Compare two arrays in VBA to find dupes

I have two simple array variables in some VBA code. I'm wondering
what is the simplest way to compare the contents (typically less than
50 items in each array) to find dupes. Specifically, I would do this:

If arFirstList (i) is in arSecondList then
Do this stuff....
Else
Do this other stuff
End if

Is there a function that would handle this or do I need to create a
For Next loop that completely cycles through the arSecondList each
time I go to a new member in arFirstList?

Thanks in advance.

- John