Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 50
Default Merging files with nearly identical values in one column

I've got two files of teacher's class information that I need to merge. For
instance, in Column C includes the teachers' names in both files. however,
in FILE1 the names are listed lastname firstname (with no comma) while in
FILE2, the names are listed lastname, firstname (with comma). Of course, the
last names are not the same length from row to row. I need to get the column
D information from File1 and have it show up in Column D in File2. normally,
this would be a simple process of copying and pasting the information except
that there are some names that appear in one file and not both and some
teachers are listed on multiple rows in one file and a different number of
rows in the other file.

Any assistance would be greatly appreciated.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,805
Default Merging files with nearly identical values in one column

Insert a column AFTER Column C in file1 and enter this in the new D1
=SUBSTITUTE(C1," ",", ")
and copy down...

Now in new E1 of file2 enter this
=VLOOKUP(D1,

switch to file1, select column C and D both together
then type
,2,false)
and press enter...

You can copy it down...

You will get #N/A for names not found in file 1..

You can hide that with
=IF(ISNA(Vlookup(),"",Vlookup())

Once you are happy, you can copy everything, paste special as values and
delete either Col C or Col D, as you want.

replace Vlookup() with the Vlookup you got above
"Allen" wrote:

I've got two files of teacher's class information that I need to merge. For
instance, in Column C includes the teachers' names in both files. however,
in FILE1 the names are listed lastname firstname (with no comma) while in
FILE2, the names are listed lastname, firstname (with comma). Of course, the
last names are not the same length from row to row. I need to get the column
D information from File1 and have it show up in Column D in File2. normally,
this would be a simple process of copying and pasting the information except
that there are some names that appear in one file and not both and some
teachers are listed on multiple rows in one file and a different number of
rows in the other file.

Any assistance would be greatly appreciated.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 50
Default Merging files with nearly identical values in one column

Thanks for the quick response. I now have another question related to
VLookup...is it possible to run it, somewhat, in reverse. In other words, in
the same file (file2 in the previous question) I have building level course
numbers (for instance M6151, M7151 and M8151) that I need to lookup. If the
course number (in column D for instance) matches ANY THREE OF THOSE, I need
to return a common number (054800...a state-level number this time) in column
E where the forumula would be. I can setup a separate worksheet where I have
all of the state-level numbers in column A with the various building-level
numbers in the subsequent columns (some of the rows would have up to 5
building-level codes for a specific state-level code).

Thanks again.

"Sheeloo" wrote:

Insert a column AFTER Column C in file1 and enter this in the new D1
=SUBSTITUTE(C1," ",", ")
and copy down...

Now in new E1 of file2 enter this
=VLOOKUP(D1,

switch to file1, select column C and D both together
then type
,2,false)
and press enter...

You can copy it down...

You will get #N/A for names not found in file 1..

You can hide that with
=IF(ISNA(Vlookup(),"",Vlookup())

Once you are happy, you can copy everything, paste special as values and
delete either Col C or Col D, as you want.

replace Vlookup() with the Vlookup you got above
"Allen" wrote:

I've got two files of teacher's class information that I need to merge. For
instance, in Column C includes the teachers' names in both files. however,
in FILE1 the names are listed lastname firstname (with no comma) while in
FILE2, the names are listed lastname, firstname (with comma). Of course, the
last names are not the same length from row to row. I need to get the column
D information from File1 and have it show up in Column D in File2. normally,
this would be a simple process of copying and pasting the information except
that there are some names that appear in one file and not both and some
teachers are listed on multiple rows in one file and a different number of
rows in the other file.

Any assistance would be greatly appreciated.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,805
Default Merging files with nearly identical values in one column

You are welcome.

It is best to set up 'building level course
numbers' in the left most column in the lookup range and state level to the
right... then it is straightforward lookup...


"Allen" wrote:

Thanks for the quick response. I now have another question related to
VLookup...is it possible to run it, somewhat, in reverse. In other words, in
the same file (file2 in the previous question) I have building level course
numbers (for instance M6151, M7151 and M8151) that I need to lookup. If the
course number (in column D for instance) matches ANY THREE OF THOSE, I need
to return a common number (054800...a state-level number this time) in column
E where the forumula would be. I can setup a separate worksheet where I have
all of the state-level numbers in column A with the various building-level
numbers in the subsequent columns (some of the rows would have up to 5
building-level codes for a specific state-level code).

Thanks again.

"Sheeloo" wrote:

Insert a column AFTER Column C in file1 and enter this in the new D1
=SUBSTITUTE(C1," ",", ")
and copy down...

Now in new E1 of file2 enter this
=VLOOKUP(D1,

switch to file1, select column C and D both together
then type
,2,false)
and press enter...

You can copy it down...

You will get #N/A for names not found in file 1..

You can hide that with
=IF(ISNA(Vlookup(),"",Vlookup())

Once you are happy, you can copy everything, paste special as values and
delete either Col C or Col D, as you want.

replace Vlookup() with the Vlookup you got above
"Allen" wrote:

I've got two files of teacher's class information that I need to merge. For
instance, in Column C includes the teachers' names in both files. however,
in FILE1 the names are listed lastname firstname (with no comma) while in
FILE2, the names are listed lastname, firstname (with comma). Of course, the
last names are not the same length from row to row. I need to get the column
D information from File1 and have it show up in Column D in File2. normally,
this would be a simple process of copying and pasting the information except
that there are some names that appear in one file and not both and some
teachers are listed on multiple rows in one file and a different number of
rows in the other file.

Any assistance would be greatly appreciated.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Merging identical workbooks in Excel 2007 deegee Excel Discussion (Misc queries) 0 November 20th 08 01:55 PM
Merging two sheets with non-identical data Robert_DubYa Excel Discussion (Misc queries) 1 November 13th 07 09:29 PM
Looking Up Datas when Key Values are Identical Frank Excel Worksheet Functions 3 November 2nd 06 03:06 AM
Lookup of identical values? TobbeGardner Excel Worksheet Functions 3 July 5th 06 10:50 PM
Merging to identical Excel files Word problems Excel Discussion (Misc queries) 4 January 12th 06 08:40 PM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"