#1   Report Post  
Charles
 
Posts: n/a
Default combine two files

Hi All:

I have two files. One looks like:

Faculty Course
Tom ACC 122
Bill BUS 220
Charles CIS 891

The other one looks like:

Course Student Grade
ACC 122 Lisa A
ACC 122 Nacy B
ACC 122 Jim A
BUS 220 Sue A
BUS 220 Carla B
CIS 891 Xu A
CIS 891 Ena C
CIS 891 Karen D

Is there any way I can merge these two files, or actually I want to add
faculty name to each student grade record. I know we can merge these two
files but the key variable Course is duplicated in the second file. I could
not use SPSS to merge them. I don't know Macro. Is there anyone who can
help me out? Thanks a lot.

Charles



  #2   Report Post  
Dave O
 
Posts: n/a
Default

I put your example data onto a single spreadsheet: the Faculty Course
headers are in cells A1 and B1; the data is in A2:B4. The Course
Student Grade headers are in cells E1, F1, and G1; the data is in cells
E2:G9. I entered a new header in D1, "Faculty" and entered this
formula in D2:
=INDEX($A$2:$B$4,MATCH(E2,$B$2:$B$4,0),1)

Copy this formula down thru D9. This formula looks for a match between
the entry in column E and the source data in column B, then returns the
corresponding value in column A.

It's important to note that a spelling error will create a mismatch:
for instance, in your sample data, Faculty member Charles teaches "CIS
891" but the students are taking a course called "CIS 891". If I
substitute a caret sign for spaces, Charles teaches "CIS^^891" but the
students take "CIS^891" which do not match. The point being, be aware
of typos, leading and trailing spaces, etc.

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
Recently Used File List - 2002 Contains 'Temp' Files Keith972002 Excel Discussion (Misc queries) 0 July 26th 05 01:46 PM
merging my excel files Donna YaWanna Excel Discussion (Misc queries) 1 June 14th 05 12:53 AM
how to combine multiple files in ms excel fifi Excel Discussion (Misc queries) 1 January 12th 05 11:11 AM
importing multiple text files URGENT!!! HELP tasha Excel Worksheet Functions 0 December 19th 04 04:26 PM
Combine multiple Excel files into one master [email protected] Excel Discussion (Misc queries) 1 November 26th 04 11:20 PM


All times are GMT +1. The time now is 12:19 AM.

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"