View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jim Fradkin Jim Fradkin is offline
external usenet poster
 
Posts: 1
Default MATCH() and ISERROR() to extract set differences

If A and B are columnar arrays, and you want to subtract set B from set A, try this:

C1 =MATCH(A1,$B$1:$B$n,0)

This returns an error if the value of A1 does not appear anywhere in the range B1:Bn.

Then

D1 =IF(ISERROR(C1),A1,"")

Column D now contains only the values of A which are not found in B.


EggHeadCafe - .NET Developer Portal of Choice
http://www.eggheadcafe.com/default.aspx?ref=ng