Compare two columns in excel?

What is a quick way or shortcut to compare two columns in Microsoft Excel?

  • Let's say i have two columns C1      C2       a          b b          a c          x d          y e          f f           z             t (There are more than 2000 values) I want to compare them and generate three columns where: Column A : Should have text which is there in both C1 & C2 Column B : Should have text Which is there in C1 but not in C2 Coulmn C should have text which is there C2 but not in C1

  • Answer:

Vivek Venkitesh at Quora Visit the source

Was this solution helpful to you?

Other answers

With a few dummy columns you can solve it like this:Assuming that your data is in columns A and B you type:In C1: =IF(ISNA(MATCH(A1,B:B,0)),"",ROW()). If the value in column A is in column B this returns the row where it can be found in Column A.In D1: =IF(ISNA(MATCH(A1,B:B,0)),ROW(),""). If the value column A is NOT in column B  this returns the row where it can be found in Column A.In E1: =IF(ISNA(MATCH(B1,A:A,0)),ROW(),""). If the value column B is NOT in column A  this returns the row where it can be found in Column B.In F1: =IFERROR(INDEX(A:A,SMALL(C:C,ROW())),""). This returns the first value that appears in both columns.In G1: =IFERROR(INDEX(A:A,SMALL(D:D,ROW())),""). This returns the first unique value in column A.In H1: =IFERROR(INDEX(B:B,SMALL(E:E,ROW())),""). This returns the first unique value in column B.Select C1:H1 and double click the tiny black square in the lower right part of the selected area. All columns will now expand downwards and column F will be a list of all values that are in both A and B, column G will be a list of values that are only in A and column H will be a list of values that are only in column B.

Marcus Högenå Bohman

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.