Searching through 200,000+ records in 2003

Jeffrey Green

Well-known Member
Joined
Oct 24, 2007
Messages
1,021
I have a list of about 20,000 Code on my first worksheet.
I have about 200,000 codes on my second worksheet, 50k to a column, 4 columns.

I need to see if my 20,000 code on on the second sheet.

I would normally cheat and do it the "poor man's way" and name each column on sheet 2 and search all of columns individually.

Gots to be an easier way . . .

thanks
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Easiest to hardest implementation algorithms:
1) Sort (Fast)
2) Dictionary (Slow)
3) Hash table (faster)
 
Upvote 0
Sheet 1, Column A only, I can name it "source" . . .
Sheet 2, Columns A-D, I can name the range as "data" if it helps.

Tks
 
Upvote 0
Sheet 1, Column A only, I can name it "source" . . .
Sheet 2, Columns A-D, I can name the range as "data" if it helps.

Tks

When we sort columns A-D, what do we get:

1) B follows up A alphabetically, C follows up B, D follows up C;
2) Each column is alphabetically independent from others?
 
Upvote 0
Column A would be, for example A-F, top down
Column B would G-J, top down
Column C would be K-O,
etc.

Great, thanks.

Sheet1, B2, copy down:
Code:
=LOOKUP(9.99999999999999E+307,CHOOSE({1,2,3,4,5},0,
   (LOOKUP(A2,Sheet2!A:A)=A2)+0,(LOOKUP(A2,Sheet2!B:B)=A2)+0,
   (LOOKUP(A2,Sheet2!C:C)=A2)+0,(LOOKUP(A2,Sheet2!D:D)=A2)+0))

which requires sorting in ascending order.

Unsorted...
Code:
=ISNUMBER(LOOKUP(9.99999999999999E+307,CHOOSE({1,2,3,4},
   MATCH(A2,Sheet2!A:A,0),MATCH(A2,Sheet2!B:B,0),
   MATCH(A2,Sheet2!C:C,0),MATCH(A2,Sheet2!D:D,0))))+0

A result of 1 means: Yes, A2 is in the set, 0 not.

Note that the first option is expected to be faster/more efficient.
 
Upvote 0

Forum statistics

Threads
1,224,503
Messages
6,179,135
Members
452,890
Latest member
Nikhil Ramesh

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top