How to automatically compare values across columns

G

Guillaume

Hey, I'd like to know if it's possible to automatically
select for rows that have equal (or different, if the
majority of rows have equal) values in two adjacent
columns. That is, let's say you've got two columns and
they're hundreds of rows long, but each row's value is
simply either a 1 or a 2. How, without simply scrolling
down and looking yourself, can you determine which rows
both have 1 (or 2)? Or if most of the rows have the same
value in both columns, how do you select for those that
don't?
 
M

Myrna Larson

I would use a "helper" column: assuming headers in row 1 and data in columns A
and B, in C2 put the formula =IF(B2=A1,0,1). Copy this down. Then use
Data/AutoFilter on column C and select either the 0's or 1's, depending on
whether you want to see the matches or the mismatches.
 
Top