

Next, enter the following formula in the provided field:.First, select the rule type Use a formula to determine which cells to format.This will open a New Formatting Rule window.While in the Home tab, click on the Styles group's Conditional Formatting button and select the New Rule… option from the menu.Select the cells in the dataset for comparison.Here are the steps to highlight cells with matching data with Conditional Formatting: This is easily achievable using the very handy Conditional Formatting feature in Excel.Ĭonditional Formatting changes the appearance of a cell to show if a certain condition is met. For a quick look, it'd immediately be more noticeable to have the matching cells highlighted.

Perhaps you don't want to have a resulting column with TRUEs and FALSEs or their equivalents. The IF function takes the resulting TRUE from the EXACT function and returns "Match".Ĭompare & Highlight Cells with Matching Data (side by side) In the second row of the dataset, B4 and C4 are the same case type. The EXACT function results in FALSE and the IF function returns FALSE as our supplied text string "Check source 2". We find C3 to contain the surname in uppercase which is differing from the name in B3 which is in capitalized initials. The EXACT function checks the text in B3 and C3 to be exact case-sensitive matches. Here is the formula to compare the value of two cells using the equals operator: As an example, we will be working on comparing shipping and billing addresses to see if they match each other. Using the equals operator "=" we can compare the values in two columns for equalness.

Let's begin with the methods of comparing cells in the same row. The methods below are relevant to exact matches between the two columns and will not overlook even a single space character's difference between the columns. Our first test is checking whether the values in one column match the values in the adjacent column. The very first comparison of two columns is going to be a simple row by row, line by line comparison. Compare Two Columns & Pull Matches (Partial Match)Ĭompare Cells in the Same Row (side by side).Compare Two Columns & Pull Matches (Exact Match).Compare Two Columns & Highlight Mismatching Data.Compare Two Columns & Highlight Matching Data.Compare & Highlight Cells with Matching Data (side by side).Compare Cells in the Same Row (side by side).So this is how you can easily see which values are duplicate in different columns in Excel. Demonstration of how repeated values are highlighted I have manually highlighted the cells with identical values in Column B green for demonstrative purposes. Note how the values of the highlighted cells in Column A are repeated in Column B. Preview of workbook after Conditional Formatting has been set The conditional formatting rule then will be applied to all values of the column and should look like this. If you are happy with the formatting you have specified click OK. You will be redirected back to the New Formatting Rule window and will be given a preview of the formatting you have selected. After having specified the format you want click OK. Change the cell color by clicking on the Fill tab and selecting a colorħ. It is possible to set a different cell color for duplicate values by clicking the Fill tab and selecting a background color. Click on the Format button and specify the format you want to set. =countif($B:$B, $A1) Enter the formula provided in the text boxĦ. Proceed by entering the following formula in the ‘ Format values where this formula is true‘ box: Select the ‘Use a formula to determine which cells to format’ optionĥ. Select ‘ Use a formula to determine which cells to format‘ as a rule in the New Formatting Rule window. Select New Rule from the Conditional Formatting drop-down listĤ. Select the New Rule option from the Conditional Formatting button drop-down list. Select the Conditional Formatting button under the Home tabģ. Select the Conditional Formatting button on the Home tab. Highlight column A by clicking the column headerĢ. Click on the Column Header to highlight Column A.
COMPARE TWO COLUMNS IN EXCEL AND PRINT DIFFERENCES HOW TO
In this tutorial I will show you how to compare two columns in Excel so that the values that appear in both columns become highlighted and you can do something with those duplicate values.
