Comparing columns
Comparing columns
(OP)
Hi there,
I'm trying to find a way to compare 2 columns that I have. In col A I have 233 numbers and in col B I have about 300 entries. I'm trying to see if any of my numbers in col A match any number in col B. I'm trying to do a simple IF statement... something like if(A1 = B1:B300, true)... but I want it to compare for each entry in col B...
Help?
thanks!
I'm trying to find a way to compare 2 columns that I have. In col A I have 233 numbers and in col B I have about 300 entries. I'm trying to see if any of my numbers in col A match any number in col B. I'm trying to do a simple IF statement... something like if(A1 = B1:B300, true)... but I want it to compare for each entry in col B...
Help?
thanks!
RE: Comparing columns
IF(C2=C1,1,0)
in cell E2, then copying E2 down as far as E533. SUM(E2:E533) will give you the total number of duplications.
Two potential complications:
(1) If you want to know WHERE these dupicates occur rather than merely WHETHER they occur, you will have to create a fourth column D in which you record the original locations in some manner. Then you sort columns C and D together, on the contents of C.
(2) If you have the possibility of duplication appearing in column A alone or in column B alone, then the method will now work without removing those duplicates first. Of course if you adopt approach (1) above, then whilst you will still count such situations you will be able to identify them from the addresses of the original cells.
HTH
RE: Comparing columns
RE: Comparing columns
Try this formula
=IF(ISNA(MATCH(A1,$B$1:$B$9,0)),"NO MATCH","MATCH")
Amend cell refs as required.
----------------------------------
Hope this helps.
----------------------------------
maybe only a drafter
but the best user at this company!
RE: Comparing columns
=VLOOKUP(A1,$B$1:$B$300,1,FALSE)
will retrieve the value from column B that got the match. Anything that doesn't match will result in #N/A, which you can then handle with a simple IF...ISNA statement.
Hope this helps!