ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   VLOOKUP (https://www.excelbanter.com/excel-programming/275073-vlookup.html)

Dave B[_3_]

VLOOKUP
 
I have two tables of data with names for the same entity that aren't exactly
the same in each table, so I'm trying to link them together by using IDs and
VLOOKUP. For instance, in one table I have "Beachwood City SD" and in the
other I have "Beachwood Ohio City Sch Dist". This is the same school
district, and I want to merge the data in the two tables to one master
table. But when I use VLOOKUP(B37,SchoolDistricts,1,TRUE) it doesn't give
me the correct matches:

Name1 Name2
VLOOKUP Result
Beachwood City SD BEACHWOOD OHIO CITY SCH DIST BEACHWOOD OHIO CITY SCH
DIST
Beavercreek City SD BEAVERCREEK OHIO LOC SCH DIST BEACHWOOD OHIO CITY
SCH DIST
Bedford City SD BEDFORD OHIO CITY SCH DIST BEAVERCREEK
OHIO LOC SCH DIST
Bellaire Local SD BELLAIRE OHIO CITY SCH DIST BEDFORD OHIO
CITY SCH DIST
Bellefontaine City SD BELLEFONTAINE OHIO CITY SCH DIST BELLAIRE OHIO CITY
SCH DIST

It seems like it just takes the first match with the same first two or three
letters. I even tried to use VLOOKUP(Left(B37,6),SchoolDistricts,1,FALSE)
to
match the first six letters exactly, but that didn't work either. Any
ideas?

P.S. Has the microsoft.excel.worksheet.functions newsgroup been
discontinued? My Outlook Express won't synchronize any message headers more
recent than 06/15/2002...




Dave Peterson[_3_]

VLOOKUP
 
First, .worksheet.functions is thriving. (But I don't use OE as a newsreader.
I'm not sure what you should reset.) Maybe just unsubscribing and resubscribing
would be sufficient. (Just a guess).

but your formula could be changed to:

=VLOOKUP(LEFT(b37,6),LEFT(Schooldistricts,6),1,FAL SE)
(hit ctrl-shift-enter instead of enter. This is an array formula and if you do
it correctly, excel will wrap your formula with curly brackets {}.)

Did you really mean to return the first column? Maybe 2 or 3???

Dave B wrote:

I have two tables of data with names for the same entity that aren't exactly
the same in each table, so I'm trying to link them together by using IDs and
VLOOKUP. For instance, in one table I have "Beachwood City SD" and in the
other I have "Beachwood Ohio City Sch Dist". This is the same school
district, and I want to merge the data in the two tables to one master
table. But when I use VLOOKUP(B37,SchoolDistricts,1,TRUE) it doesn't give
me the correct matches:

Name1 Name2
VLOOKUP Result
Beachwood City SD BEACHWOOD OHIO CITY SCH DIST BEACHWOOD OHIO CITY SCH
DIST
Beavercreek City SD BEAVERCREEK OHIO LOC SCH DIST BEACHWOOD OHIO CITY
SCH DIST
Bedford City SD BEDFORD OHIO CITY SCH DIST BEAVERCREEK
OHIO LOC SCH DIST
Bellaire Local SD BELLAIRE OHIO CITY SCH DIST BEDFORD OHIO
CITY SCH DIST
Bellefontaine City SD BELLEFONTAINE OHIO CITY SCH DIST BELLAIRE OHIO CITY
SCH DIST

It seems like it just takes the first match with the same first two or three
letters. I even tried to use VLOOKUP(Left(B37,6),SchoolDistricts,1,FALSE)
to
match the first six letters exactly, but that didn't work either. Any
ideas?

P.S. Has the microsoft.excel.worksheet.functions newsgroup been
discontinued? My Outlook Express won't synchronize any message headers more
recent than 06/15/2002...


--

Dave Peterson



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

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