March 15, 2010

Comparing two columns and finding duplicates

If you would like to compare and find duplicate of data on two columns. We can do that,



In the above examples we have name of persons in two columns. we have compared both the columns and found the common data available in both the columns.

We have used $ symbol in the formula, it is used to freeze the cell reference. If you don’t use the $ symbol the cell reference will be changed when you drag the formula to another cell.

While entering the above formula, at the time of giving reference of C1:C6 you need to press F4 key, since we have to freeze the cell references.

The formula in D1 took the name David in A1, then it would look for the same in C1 to C9 and if it is available anywhere in the specified range it will write the value for which it looked and if it is not then it would write an error message.

Drag down the formula in D1 to D2, now it will change the look up cell as A2 and it would not change the array reference I.e C1:C9 since we have freezed the reference using $ symbol.

The formula in D2 will take the name John in A2 and then it would look for the same in C1 to C9 and if it is available anywhere in the specified range it will write the value for which it looked and if it is not then it would write an error message.

No comments:

Post a Comment