*If the columns have different names in both tables, you might need to select the right column manually by clicking the little black arrow next to the Table 2 column on the right-hand side: Step 6.*

The first COUNTIF counts how many columns have the same value as in the 1 Suppose you have 2 lists of data in Excel, and you want to find all values (numbers, dates or text strings) which are in column A but not in column B.

For this, you can embed the COUNTIF($B:$B, $A2)=0 function in IF's logical test and check if it returns zero (no match is found) or any other number (at least 1 match is found).

This task can be done by using the IF function, as demonstrated in the following examples.

To compare two columns in Excel row-by-row, write a usual IF formula that compares the first two cells.

Enter the formula in some other column in the same row, and then copy it down to other cells by dragging the fill handle (a small square in the bottom-right corner of the selected cell).

As you do this, the cursor changes to the plus sign: To find cells within the same row having the same content, A2 and B2 in this example, the formula is as follows: The result may look similar to this: As you see, the formula handles numbers, dates, times and text strings equally well.

You can shade such cells in any color of your choosing by using the Excel Conditional Formatting feature and the following examples demonstrate the detailed steps.

To compare two columns and Excel and highlight cells in column A that have identical entries in column B in the same row, do the following: If you are new to Excel conditional formatting, please see How to create a formula-based conditional formatting rule for step-by-step instructions.

As an alternative, you can use more powerful and versatile INDEX & MATCH formulas.

For example, the following formula compares the product names in columns D and A and if a match is found, a corresponding sales figure is pulled from column B. For the detailed explanation of the formula's syntax and more formula examples, please check out the following tutorial: INDEX & MATCH in Excel - a better alternative to VLOOKUP.

## Comments Updating pro punch c1