In columb A there are 1239 different numbers
and in columb B there are 119 numbers
Ok, that makes it better since now all you need to do is compare the short
list to the long list (less formulas needed).
Let's assume the lists are in the ranges A2:A1200 and B2:B120
Create 2 named ranges.
If the list in column A is in the range A2:A1200, click inside the name box.
The name box is that little space directly above column A that shows you
which cell is selected. Type in the name box A2:A1200 and hit the ENTER key.
This will select the range A2:A1200. Click in the name box again and type in
a name for that range then hit the ENTER key. For this example I'll use the
name rng1. Repeat this process for the list in column B. For this example
I'll use the name rng2.
Now, enter this array formula** in C2:
=INDEX(rng2,SMALL(IF(ISNUMBER(MATCH(rng2,rng1,0)),ROW(rng2)),ROWS(C$2:C2))-MIN(ROW(rng2))+1)
** Do not hit the ENTER key. Instead, hold down both the CTRL key and the
SHIFT key then hit the ENTER key. When done properly Excel will enclose the
formula in squiggly brackets { }. You *can not* just type these brackets in.
You *must* use the key combination to produce them. Also, if you edit or
change the formula later on you *must* re-enter it using the key
combination.
Drag copy the formula in C2 down column C until you get results of #NUM!.
This means all the dupes have been extracted and the data has been
exhausted.