x = True
For i = LBound(array1) to UBound(array1)
If array1(i) <> array2(i) Then
x = False
Exit For
End If
Next i
If x = True Then
MsgBox "Match"
Else
MsgBox "Item " & i & " does not match"
End If
If Join(array1, "") = Join(array2, "") Then
MsgBox "Match"
Else
MsgBox "Mismatch"
End If
If you don't need to know which item mismatches you could use the Join function (Excel 2000 and above):
Code:If Join(array1, "") = Join(array2, "") Then MsgBox "Match" Else MsgBox "Mismatch" End If