Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 67
Default Comparing Worksheet ranges

I would like to compare Range A and Range B and then be able to identify or
write out the items in A that re NOT in B.
Keep in mind,, that range B has unique items but Range A had several
instances of the same name....i.e. non-unique items. I have done this
successfiully via Array formulas in the wrksht, but it takes too long. I
would like to do in code. Any suggestions?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Comparing Worksheet ranges

Chip Pearson have a great website that get you started
http://www.cpearson.com/excel/duplicat.htm

--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"ibeetb" wrote in message ...
I would like to compare Range A and Range B and then be able to identify or
write out the items in A that re NOT in B.
Keep in mind,, that range B has unique items but Range A had several
instances of the same name....i.e. non-unique items. I have done this
successfiully via Array formulas in the wrksht, but it takes too long. I
would like to do in code. Any suggestions?




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 67
Default Comparing Worksheet ranges

wHAT i ACTUALLY NEED TO DO IS do this in code.....not worksheet array
formulas....in the wrksht takes too long and your link was useful, but it
works easiest for wrksht formulas in the wrkshtr
"Ron de Bruin" wrote in message
...
Chip Pearson have a great website that get you started
http://www.cpearson.com/excel/duplicat.htm

--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"ibeetb" wrote in message

...
I would like to compare Range A and Range B and then be able to identify

or
write out the items in A that re NOT in B.
Keep in mind,, that range B has unique items but Range A had several
instances of the same name....i.e. non-unique items. I have done this
successfiully via Array formulas in the wrksht, but it takes too long. I
would like to do in code. Any suggestions?






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 124
Default Comparing Worksheet ranges

If speed is the issue, VBA code will probably be SLOWER than the array formulas, not faster.

You can identify missing items with a COUNTIF or MATCH formula. Assuming you've named the ranges
RangeA and RangeB. Let's say RangeA starts in A2. RangeB starts in F2. In B2

=IF(COUNTIF(RangeB,A2)=0,"Missing from B","")

or

=IF(ISERROR(MATCH(A2,RangeB,0)),"Missing from B","")

and copy down through the last entry in RangeA.





On Mon, 15 Sep 2003 11:11:54 -0400, "ibeetb" wrote:

I would like to compare Range A and Range B and then be able to identify or
write out the items in A that re NOT in B.
Keep in mind,, that range B has unique items but Range A had several
instances of the same name....i.e. non-unique items. I have done this
successfiully via Array formulas in the wrksht, but it takes too long. I
would like to do in code. Any suggestions?


Reply
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
Comparing 2 ranges? calberto22 Excel Discussion (Misc queries) 3 October 13th 07 03:19 AM
comparing ranges/arrays asaylor Excel Worksheet Functions 7 June 13th 06 11:53 PM
Comparing ranges: ben simpson Excel Discussion (Misc queries) 1 March 8th 06 04:35 AM
How to : Comparing Two Ranges lockwood7 Excel Worksheet Functions 3 August 3rd 05 01:43 PM
Comparing two arrays/ranges SpiderBoy Excel Programming 0 July 25th 03 07:58 PM


All times are GMT +1. The time now is 05:23 PM.

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"