Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

comparing 2 columns to find matches

Status
Not open for further replies.

zircom

IS-IT--Management
Mar 12, 2001
31
0
0
GB
I need to look at 2 columns:

'A' 'B' 'C'

2345 2345 Y
4567 4568 Y
4568 6789 N
7890 7890 Y

Etc (3,500 numbers) and i need to see which ones in column 'B' are in column 'A'.

THanks
 
Hi,

In cell C2 place the following formula:

=IF(A2=B2,"Y","N")

or

=IF(A2=B2,"","N")

(to just show the non-matching entries)

press Enter and check the result. Then copy down as far as needed.

Good Luck!

Peter Moran
 
can they be out of sync ? ie in different rows ?

If so you can use

=if(countif($A$2:$A$3500,B2)>0,"Y","N")

and copy down

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
Hi zircom:

Or ...

ytek-tips-thread68-1396001-01.gif


Yogi Anand, D.Eng, P.E.
Energy Efficient Building Network LLC
 
You can also use the "Match" operator.

=Match(A2, B:B, 0) (copy the formula the for each row)

MATCH(lookup_value,lookup_array,match_type)

Matchtype

It will return the line (or row) number of the record that matches A2 and #N/A if there is not a match for that row.
 
great response and they worked, i used a couple of them in the spread sheet to show a sanity check process.

thanks again
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top