Hi!
Here's one way: (based on your sample)
This will return the values from column A that do not appear in column B.
Assuming the range of data starts on row 2.
Enter this formula in C2. This is an array formula. Instead of typing the
formula and hitting the ENTER key, you type the formula then use the key
combination of CTRL,SHIFT,ENTER. That is, hold down both the CTRL key and
the SHIFT key then hit ENTER. Also, if you ever edit an array formula it
must be re-entered using the key combo.
=INDEX(A$2:A$7,SMALL(IF(COUNTIF(B$2:B$7,A$2:A$7)=0,ROW(A$2:A$7)-ROW(A$2)+1),ROWS($1:1)))
Copy down until you get #NUM! errors meaning the data has been exhausted.
If you don't want to see the errors use this version (still array entered):
=IF(ROWS($1:1)<=SUMPRODUCT(--(ISNA(MATCH(A$2:A$7,B$2:B$7,0)))),INDEX(A$2:A$7,SMALL(IF(COUNTIF(B$2:B$7,A$2:A$7)=0,ROW(A$2:A$7)-ROW(A$2)+1),ROWS($1:1))),"")
If you want to switch it around and return the values from column B that do
not appear in column A then all you need to do is "flip" these references:
From: MATCH(A$2:A$7,B$2:B$7,0)
To: MATCH(B$2:B$7,A$2:A$7,0)
From: COUNTIF(B$2:B$7,A$2:A$7)
To: COUNTIF(A$2:A$7,B$2:B$7)
Biff
"TaGY2K" <(E-Mail Removed)> wrote in
message news:(E-Mail Removed)...
>
> Ok... say I have like 1,000 records on column A and column B ..is there
> a way to write a formula say... going down column B and compare to
> column A and tell me which number or char. is not in colum A but is in
> column B ..or vice versa ..
> ie
>
> A B C
>
> 12 12
> 13 14 13
> 14 15
> 15 18 18
> 16 16
> 17 17
>
>
> I tried write an if statement .. if true =1 false = 0 ...but that
> doesn't work.. 
>
>
> --
> TaGY2K
> ------------------------------------------------------------------------
> TaGY2K's Profile:
> http://www.excelforum.com/member.php...fo&userid=1861
> View this thread: http://www.excelforum.com/showthread...hreadid=564993
>