You can't find code to even start? I went straight to Microsoft,and found this example:
' This macro will import a file into this workbook
PathName = Range("D3").Value 'example - c:\
Filename = Range("D4").Value 'example - Book1.xlsx
TabName = Range("D5").Value 'example -BookONE
ControlFile = ActiveWorkbook.Name
Workbooks.Open Filename:=PathName & Filename
ActiveSheet.Name = TabName
It will load any spreadsheet you want, and combine it into your current workbook. So, when you are ready to compare, and you realize that line 1 on sheet1 is line 10 on sheet2, but it was output to your third sheet anyway (not wanting it, because it was found on each sheet), you will realize what kind of processing power you are going to need, depending on your file sizes.
You do understand that in the above example, in order to do a comparison, we would need to load every value for comparison. If it is a line by line comparison, then no big deal, and you would expect to get row 1 back on your third sheet, as row 1 an sheet 1 would not match row 1 of sheet2!
Now, we have not got to the comparison part, because it is important to know what kind of comparison you want. Do you want anything found on sheet1, and not on sheet2 to be placed? Does row X on sheet1 have to match row X on sheet2?
So what is this comparison for?