1

This should be quick and easy.

I want to compare two columns and flag any mismatches in a third column. What is the easiest way?

Sample output:

1   |      A          B       C
2   |  =========  =========  ===
3   |  apple      apple       
4   |  banana     bananas     1
5   |  orange     orange
6   |  melon      melon
7   |  lemon      lEmon       1
sblair
  • 12,757
R C
  • 125

1 Answers1

3

Why does this look like a homework-assignment? ... /tease. Try something like:

=A1=B1

for your formula. This will return true/false, which may not be what you want 100%... but it's the most efficient method. Alternatively, you can rely on the IF statement... to get exact results... like this:

=IF(A1=B1,"1","")

IF is not very CPU efficient... but it'l do the job. If you need a case-sensitive check... use the EXACT function instead. i.e.

=EXACT(A1,B1)

or

=IF(EXACT(A1,B1),"1","")
TheCompWiz
  • 10,912