View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Greg Snidow Greg Snidow is offline
external usenet poster
 
Posts: 153
Default Compare two arrays

Joel, thanks for the input. I could not get the Join function to work with
my arrays at all, and the VB help for Join is seriously lacking. Anyhow, I
took what I think is your basic idea, and accomplished it like this....

For r = 1 to RowCount Step 1
For c = 1 to ColumnCount Step 1
String1 = String1 & MyArray(r,c)
Next c
Next r

It seems to concatanate all the array values into one string, so I think I
am good to go. Thanks again.

Greg

"joel" wrote:


You could do this

Matched = True
for i = 1 to 4
Str1 = join(Array1(i),",")
Str2 = join(Array2(i),",")
if Str1 < Str2 then
Matched = False
Exit For
end if
next i

If Matched = false then
msgbox("Arrays did'nt Match")
end if


--
joel
------------------------------------------------------------------------
joel's Profile: http://www.thecodecage.com/forumz/member.php?userid=229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=157541

Microsoft Office Help

.