ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Searching for text (https://www.excelbanter.com/excel-discussion-misc-queries/90060-searching-text.html)

strippier

Searching for text
 
Hiya,

I have a list of names (approx 110,000) which I need to search for specifc
names (approx 1000).

eg A = list of 110k names / C = search criteria 1000 names / B = found Y or N
Column A Column B Column C
Mr Smith Y Smith
RC Jones N Trip
S Abdul Y Abdu
R Basil N
etc

It needs to use the C list of names and show where these exist in the column
A list, putting the results in column B.

I deally I would like a % match, i.e. smith contanied 100% within Mr Smith,
but only 60% within Mr Smithson etc.

Any ideas?

Thanks for you time.

Simon

Ardus Petus

Searching for text
 
110k 65536, so Excel will not hold your names list

--
AP

"strippier" a écrit dans le message de
news: ...
Hiya,

I have a list of names (approx 110,000) which I need to search for specifc
names (approx 1000).

eg A = list of 110k names / C = search criteria 1000 names / B = found Y
or N
Column A Column B Column C
Mr Smith Y Smith
RC Jones N Trip
S Abdul Y Abdu
R Basil N
etc

It needs to use the C list of names and show where these exist in the
column
A list, putting the results in column B.

I deally I would like a % match, i.e. smith contanied 100% within Mr
Smith,
but only 60% within Mr Smithson etc.

Any ideas?

Thanks for you time.

Simon




mrice

Searching for text
 

I would suggest that you save your list of 110K names in a .txt file.

Then put your 1000 names in Excel.

Read in the text file line by line using something like

open "C:\Myfile.txt" for input as #1
Do while not EOF(1)
Line input #1, FileLine
For Each Cell in Range(Cells(1,1),Cells(1000,1))
If Cell = FileLine then Cell.offset(0,1) = Cell.offset(0,1)+1
Next Cell
Loop
Close #1

It will probably take quite a while to run.


--
mrice

Research Scientist with many years of spreadsheet development experience
------------------------------------------------------------------------
mrice's Profile: http://www.excelforum.com/member.php...o&userid=10931
View this thread: http://www.excelforum.com/showthread...hreadid=544700



All times are GMT +1. The time now is 06:06 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com