View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson[_3_] Dave Peterson[_3_] is offline
external usenet poster
 
Posts: 2,824
Default nonduplicative merge

Say your data were in columns A and B of each worksheet.

I'd insert a new worksheet.
copy all the info from each worksheet (only one header row, though) into that
new worksheet.

Then add another column and add a formula:

=A2&char(1)&b2
Drag down the length of the column.

Then apply Data|filter|advanced filter to column C and show only the unique
entries.

Then copy those visible cells from A:B to a new sheet.



DrSteve wrote:

I have several sheets with the following 2 columns:

PersonnelCode Name

The sheets share some, but not all, information.
Generally each sheet has some PersonnelCode-Name pairs
that are unique to the sheet. The PersonnelCode and Name
sets are themselves one-to-one.

I would like to write a macro that will produce, in 2
corresponding columns on a master sheet, a nonduplicative
merge of all the columns of PersonnelCode and Name
information. I can do this with hooks into Excel from
some external DB/data processing apps, but would like to
do it all from within Excel if I can.

Many thanks in advance.


--

Dave Peterson