View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default merging two files

I'd return the address into a different column (or columns).

If your master data is on Sheet1 and your SPSS data is on Sheet2, you could use
=vlookup() (with the key ID column in column A of each worksheet):

=vlookup(a2,sheet2!a:b,2,false)

or

=if(iserror(vlookup(a2,sheet2!a:b,2,false)),"",vlo okup(a2,sheet2!a:b,2,false))

You could expand the range (to Sheet2!a:x) and bring back different columns (2,
3, 4,...) if the addresses are across columns.

You may want to read Debra Dalgleish's notes:
http://www.contextures.com/xlFunctions02.html (for =vlookup())
and
http://www.contextures.com/xlFunctions03.html (for =index(match()))

mcap wrote:

Hi all:

I have a list of addresses, each with an ID number. I also have
another file that is a list of ID numbers that I have imported from
SPSS. The imported ID numbers contain most but not all of the ID
numbers from the address list.

What I would like to do is to match up the IDs from the imported
file to the address list so that for each case, there would be the
original ID and the imported ID. Where there wasn't an imported ID, it
should be blank in that column.

What I am trying to do is take the ID numbers of subjects who have
responded to a survey and mark them so that I can filter and delete the
addresses of those who did not respond.

Any ideas??????

Marc


--

Dave Peterson