Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Comparing 2 ranges? | Excel Discussion (Misc queries) | |||
comparing ranges/arrays | Excel Worksheet Functions | |||
Comparing ranges: | Excel Discussion (Misc queries) | |||
How to : Comparing Two Ranges | Excel Worksheet Functions | |||
Comparing two arrays/ranges | Excel Programming |