Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

need to merge two worksheets with similar, but not SAME

  Asked By: Hayfa    Date: Sep 12    Category: MS Office    Views: 729
  

I was given this task to take these two files, both employee
information lists, in separate worksheets and separate workbooks, and
come up with a script that will allow them to be merged into one
document, containing all the information in both, without duplicates.
HELP!!!!

Share: 

 

2 Answers Found

 
Answer #1    Answered By: Jimmie Ramirez     Answered On: Sep 12

There are lots of ways to do this.
The question is: how do YOU want it to do this and when?
You can have a "control" sheet, or "summary" sheet that
has a button that you hit when you want to combine the workbooks.
You can make it so that it automatically does it when you OPEN the workbook.
You can make it so that it automatically runs, but prompts the user if he/she
wants to refresh or update the data... you can make it so that it only does this
if the user is one of a list of users...
As you can see, there is a myriad of possibilities.

the next question is: are both worksheets  formatted the same?
Same columns, etc...

Where do you want the resulting workbook to reside?

Let's say the answer is:
You want to have a third workbook, a "summary" workbook, that has
a button at the top of the page, used to refresh the data.
The refresh button first deletes the contents of the current sheet,
then copies the data from the first workbook to the sheet.
then, it opens the second workbook and reads through the data, checking
for existing records. If no existing record is found, then it copies the data
to the end.

Once complete, it sorts the sheet and saves the file.

How's that?

 
Answer #2    Answered By: Gilberto Thompson     Answered On: Sep 12

Ok, what I have is two separate  workbooks. One has two worksheets  in it (I
only need data from one of them), the other has one worksheet. They are both
employee information lists  for my department, but while they have similar
data, they do differ somewhat. One (from the HR dept.) has more columns than
the other and the one with less columns (from the IM dept.) has some that
the other one does not have. The data is updated periodically by people from
both the HR department and the IM department. The merged  document will
reside in our Disaster Recovery folder where only those in the DR team have
access. I think your idea is what I need, so that the summary doc will
always have the most updated info. This info will be used to contact
our employees in the event of a disaster of any kind. I have tried
just consolidating the docs, then sorting based on User ID, which is a
common column in both worksheets, but that does not do anything with the
duplicate entries or the different columns. I need it to get rid of
duplicate ID's but keep the info that is not reflected on the other page.
For example, one has User ID, Name, Phone, Address, Title and the other has
User ID, Last Name, First Name, Home phone, Work phone, Department, Manager,
email. I need it to reflect one user with User ID, Last Name, First Name,
Home Phone, Work Phone, Address, Title, Department, Manager, Email. Does
that make sense?

 
Didn't find what you were looking for? Find more on need to merge two worksheets with similar, but not SAME Or get search suggestion and latest updates.




Tagged: