data comparison in excel 97


Posted by j ross on December 04, 2001 11:03 AM

I need to check whether a string (eg. 00/14-12-039-19w4/0) found in one column is included in a second column. I then want to go down through the first column and check each one for this inclusion.

Posted by Aladin Akyurek on December 04, 2001 11:35 AM

Lets say that the target strings are in A and you want to check whether each of these also occurs in B.

In C1 enter: =ISNUMBER(MATCH(A1,B:B,0))

will return a 1 if the taget string is also in column B, otherwise a 0.

Copy down this formula as far as needed.

You can also give a range like B1:B100 instead of B:B, the whole column B to MATCH in the above formula.

Aladin

Posted by j ross on December 04, 2001 1:38 PM


I am not getting the correct results with this. For example I have a column (A) of 800 rows with various "land locations" in the format of:

00/13-14-039-45W4/0 or
01/33-74-025-24W0/0 etc.

I have a second colum (B) of 2000 rows with varous "land locations" in the same format. I want to check if each "land location" listed in B is found in A somwhere. Essentially I need to tell excel to select cell b1 and check if it is contained in A1:A2000. Then move down to b2 and repeat the check to see if it is contained in A1:A2000. I want the result to print out something indicating if the value in B was found somewhere in A.

:)

Posted by Aladin Akyurek on December 04, 2001 2:07 PM

If you put the following in C1

=IF(COUNTIF($A$1:$A$2000,B1),"Found","Not Found") [ or more expensive =IF(ISNUMBER(MATCH(B1,$A$1:$A$2000,0) ]

and copy down this till C2000 (alternatively, just dubble click on the little black square of the cell C1), you'll have a formula-based checking whether each land location in B is also in A somewhere.

Aladin



Posted by Aladin Akyurek on December 04, 2001 2:10 PM