Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question already has an answer here:

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
share|improve this question

marked as duplicate by Karan, fixer1234, Michael Kjörling, Excellll, Julian Knight May 22 '15 at 10:08

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

up vote 3 down vote accepted

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


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 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.



share|improve this answer
Thanks a lot. :) Not a homework assignment, just a quickie on Excel (I am a PHP guy and was gonna write a quick script to process this, but I knew there had to be a super simple way to do it. Thanks for the comprehensive answer!). – R C Jan 4 '12 at 15:16

Not the answer you're looking for? Browse other questions tagged .