View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Martin Wheeler Martin Wheeler is offline
external usenet poster
 
Posts: 57
Default compare values in 2 ranges

xl 2003
I need to compare the values in ranges M1:M3 to CE7:CE9. The values, in the
current worksheet, are 3,8,5 and 3,5,8. These values are the same but not in
the same order. The order is not important. What I need to know is if the
values are the same, regardless of order. So in this case the answer would
be yes and proceed to the next sub.
I could write something like :-
If .range("M1").value = .range("CE7").value or .range("M1").value =
..range("CE8").value or .range("M1").value = .range("CE9").value then....

and do this for all 3 cells in M1:M3 but it seems a clumsy, longwinded
method.

Is there a simpler method? Any help would be greatly appreciated.
Ta,
Martin