Only Match the first 10 characters...

mjbryant

New Member
Joined
Feb 17, 2003
Messages
27
I have two files with company names. The company names in each file have been entered over the past year by numerous staff employees. Sometimes, the names entered are not consistent. For example, one person might type "Calhoun Apts" in one file and then one person might type "Calhoun Apartments" in the other file. Therefore, they are not a one to one match.

I want to only match the first 7 or so characters between each file. How do I do this?
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
You'll need your two files together in one, firstly.

Then, make a query off each table, and add a field like:
Left7: left([myField],7)
to each query.

Then, make a third query, and join the two queries on this new field.

That will show the records in which the first seven letter in both files match.. now what you choose to do once you know this, you'll have to tell us.
 
Upvote 0
Thank you so much! I'm determining how to approach this now that I have the data. I will definitely let you know if I come up with something effective.

:)
 
Upvote 0
Here's what I did in the access database to the file I created with the expression to extract only the first 7 characters:

1) I copied and pasted the file - structure only
2) I made the original column of names a primary key
3) I appended the original file into the structure only from #1 (this was to ensure there were no duplicate names)
4) I did find duplicates query on the column that i extracted the first 7 letters out of the name

this way, i have isolated those names that share the first 7 characters - now it's just a manual look-through to find like names. i'm still looking for a better process...
 
Upvote 0

Forum statistics

Threads
1,221,832
Messages
6,162,255
Members
451,757
Latest member
iours

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