LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
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


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
compare two or more ranges tywlam Excel Worksheet Functions 3 April 23rd 09 10:18 AM
Compare ranges tywlam Excel Worksheet Functions 0 April 23rd 09 04:07 AM
Using IF to compare ranges [email protected] Excel Worksheet Functions 5 April 8th 09 06:47 PM
Compare ranges Johnnyb Excel Programming 0 August 11th 04 02:30 PM
compare ranges in different workbooks and copy "not matching values" at bottom of range 1 Kaza Sriram Excel Programming 1 August 6th 04 07:47 PM


All times are GMT +1. The time now is 05:44 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"