Sorry - I forgot we're in the Worksheet Functions page, not Programming!
First up, if you haven't used macros before, do be very careful and make
backup copies of the data (with File, Save As) before doing anything like
this.
Also, before going ahead with my code, is it definitely two worksheets
you're comparing, not two workbooks?
If it's two sheets in the same book then this macro should be OK though you
may need to change the column number if you're not just comparing everything
in column A in both sheets (I'll go through that in a minute)
To make the macro work, go to Tools, Macro, Visual Basic Editor while in the
workbook we're talking about. On the left of this new window you should see
the name of your workbook in brackets after VBA Project (if not, click on
View, Project Explorer). Now click on Insert, Module and a blank window
should appear on the right called Module1 - copy and paste my macro into it
(everything from the Sub row to the End Sub row inclusive).
If the lists you're comparing are each in column A you don't need to change
the text at all but if the first sheet has its data in column B you'll need
to change:
For Each cell1 In sht1.Columns(1).Cells
to:
For Each cell1 In sht1.Columns(2).Cells
so it looks at the second column (B) instead - and so on.
Same for the data in the second sheet, in which case the line:
For Each cell2 In sht2.Columns(1).Cells
needs to be changed to:
For Each cell2 In sht2.Columns(2).Cells
To run the macro, move back to Excel (on the Task Bar at the bottom) and
choose Tools, Macro, Macros. You should see the macro's name on the list
(FindDupes); double-click to run it.
This macro takes a while - I'd have put something in to stop it (perhaps at
a blank cell) but I didn't know how your data is arranged. If you get bored,
press Esc or Ctrl-Break and then click on End; this might be a good idea when
you first run it, just to check it's working but you'll need to let it run to
be sure it's looked at every cell.
Good luck and let me know how it goes...