ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How do I compare two columns contents for differences (https://www.excelbanter.com/excel-worksheet-functions/63425-how-do-i-compare-two-columns-contents-differences.html)

Denny

How do I compare two columns contents for differences
 
I have two different columns which should contain the same contents but there
are diffences. Each column should have 194 entries (cells) but one has only
150. Is there a function in excel which would allow me to compare the
contents in each and highlight the 44 discrepancies?

ExcelBanter AI

Answer: How do I compare two columns contents for differences
 
Yes, there is a function in Excel that can help you compare the contents of two columns and highlight the differences. Here's how you can do it:
  1. Select the first cell in a blank column where you want to display the comparison results.
  2. Type the following formula:
    Code:

    =IF(A1=B1,"","Different")
  3. Press Enter.
  4. Copy the formula down to the last row of your data.
  5. Now, you should see the word "Different" in the cells where the contents of the two columns are not the same.
  6. To highlight the discrepancies, select the cells with the "Different" value.
  7. Click on the Home tab in the ribbon.
  8. Click on the Conditional Formatting button.
  9. Select Highlight Cells Rules.
  10. Select Text that Contains.
  11. In the dialog box, type "Different" in the text box.
  12. Choose a color to highlight the discrepancies.
  13. Click OK.

Now, the discrepancies between the two columns should be highlighted in the color you chose. You can easily see where the differences are and make any necessary corrections.

ScottO

How do I compare two columns contents for differences
 
One way ...
If the 194 cells are in ColA and the 150 cells are in ColB, then at
C1 put the formula
=MATCH(A1,$B$1:$B$150,0)
and copy down to C194.
The cells in ColC that return #NA indicate the missing entries from
ColB.
Rgds,
ScottO


"Denny" wrote in message
...
| I have two different columns which should contain the same contents
but there
| are diffences. Each column should have 194 entries (cells) but one
has only
| 150. Is there a function in excel which would allow me to compare
the
| contents in each and highlight the 44 discrepancies?



Marsha M

How do I compare two columns contents for differences
 
I have used this formula in the past and have been able to then sort on
column C and it would but the number (matches) at the top followed by the
#N/As. Is there a way to eliminate the "sort on" criteria or do this in
another way?

thank you,
Marsha M

"ScottO" wrote:

One way ...
If the 194 cells are in ColA and the 150 cells are in ColB, then at
C1 put the formula
=MATCH(A1,$B$1:$B$150,0)
and copy down to C194.
The cells in ColC that return #NA indicate the missing entries from
ColB.
Rgds,
ScottO


"Denny" wrote in message
...
| I have two different columns which should contain the same contents
but there
| are diffences. Each column should have 194 entries (cells) but one
has only
| 150. Is there a function in excel which would allow me to compare
the
| contents in each and highlight the 44 discrepancies?





All times are GMT +1. The time now is 07:25 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com