Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Find the differences between 2 Excel worksheets?

Tags:

excel

I have two excel files with the same structure: they both have 1 column with data. One has 800 records and the other has 805 records, but I am not sure which of the 5 in the 805 set are not in the 800 set. Can I find this out using Excel?

like image 985
Xaisoft Avatar asked Sep 30 '09 19:09

Xaisoft


People also ask

How do you compare two Excel sheets and find the differences?

Compare 2 Excel workbooks Open the workbooks you want to compare. Go to the View tab, Window group, and click the View Side by Side button. That's it!

How do you find the difference between two sets of data in Excel?

Calculate the difference between two numbers by inputting a formula in a new, blank cell. If A1 and B1 are both numeric values, you can use the "=A1-B1" formula. Your cells don't have to be in the same order as your formula. For example, you can also use the "=B1-A1" formula to calculate a different value.


2 Answers

vlookup is your friend!

Position your column, one value per row, in column A of each spreadsheet. in column B of the larger sheet, type

=VLOOKUP(A1,'[Book2.xlsb]SheetName'!$A:$A,1,FALSE) 

Then copy the formula down as far as your column of data runs.

Where the result of the formula is FALSE, that data is not in the other worksheet.

like image 190
NickSentowski Avatar answered Oct 03 '22 07:10

NickSentowski


It might seem like a hack, but I personally prefer copying the cells as text (or exporting as a CSV) into Winmerge or any other diff tool. Assuming the two sheets contain mostly identical data, Winmerge will show the differences immediately.

like image 26
Juliet Avatar answered Oct 03 '22 07:10

Juliet