Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Check if two rows are the EXACT SAME in MS Excel [closed]

Tags:

excel

In MS Excel, what is the best way to see if two rows are the exact same? I've tried with conditional formatting but it only seems like I can only check for duplicat CELLS and not whole rows. Thanks in advance for the help!

like image 999
Andrew Heekin Avatar asked Jul 23 '13 15:07

Andrew Heekin


People also ask

How do you check if two rows are the same in Excel?

Navigate to the "Home" option and select duplicate values in the toolbar. Next, navigate to Conditional Formatting in Excel Option. A new window will appear on the screen with options to select "Duplicate" and "Unique" values. You can compare the two columns with matching values or unique values.

How can you tell if two rows are identical?

Select the data range you want to compare, and in the Ribbon, go to Home > Conditional Formatting > Highlight Cells Rules > Duplicate Values.

How do you find exact match in Excel?

The MATCH function searches for a specified item in a range of cells, and then returns the relative position of that item in the range. For example, if the range A1:A3 contains the values 5, 25, and 38, then the formula =MATCH(25,A1:A3,0) returns the number 2, because 25 is the second item in the range.


2 Answers

You need an array formula that compares the 2 rows.

If you want to find out if rows 1 and 2 are exactly the same, enter this formula in a cell that isn't in row 1 or 2:

=AND(EXACT(1:1,2:2))

Instead of pressing Enter after typing the formula, press Ctrl + Shift + Enter, which will tell Excel you want an Array formula.

The result will be TRUE if they match and FALSE if they don't. You'll see curly braces around your formula if you've correctly entered it as an array formula.

Note that the EXACT formula will perform a case-sensitive comparison. Omit it if you want a case-insensitive comparison:

=AND(1:1=2:2)

entered with Ctrl + Shift + Enter as well.

One last thing: if you want to check part of a row instead of the whole row, simply specify that in the formula.

=AND(EXACT(A1:E1,A2:E2))

entered with Ctrl + Shift + Enter, of course.

like image 77
Jon Crowell Avatar answered Oct 30 '22 17:10

Jon Crowell


you can use conditional formatting using a formula like

=or(and($A2:$E2=$A1:$E1),and($A2:$E2=$A3:$E3))

applied to row 2 and below. change the columns to suit

like image 23
JosieP Avatar answered Oct 30 '22 18:10

JosieP