Computing.Net > Forums > Office Software > Merging separate Excel docs

Merging separate Excel docs

Reply to Message Icon

Original Message
Name: andhe01
Date: May 31, 2007 at 11:59:45 Pacific
Subject: Merging separate Excel docs
OS: Win XP
CPU/Ram: P4 intel 2GIG
Model/Manufacturer: Clone
Comment:

I would like to know if it can be done and how to do it.

I have three separate individual Excel workbooks. Each workbook has worksheets. Some of the rows and columns of the worksheets are the same as the other workbooks / worksheets. I would like to Merge all three workbooks into One Workbook... BUT, I want Excel to decide, on the columns and rows that are the same, which data is most current and to use that most current data in the merge.

Can this be done?? How do I do this??

Thanks for your help.


Report Offensive Message For Removal

Response Number 1
Name: DerbyDad03
Date: June 6, 2007 at 12:37:06 Pacific
Subject: Merging separate Excel docs
Reply: (edit)

I'm sure this can be done with some VBA code, but we're gonna need some more specifics. If I were going to write the code to do this, I would start by asking the following questions:

1 - What do you mean when you say "the columns and rows that are the same"? The same as in Row 3 of all sheets, or the same as in there is are matching Column or Row headings on each sheet, but not necessarily in the same locations.

2 - If the code is going to compare one dataset (row or column) to another, how will it know which one is most current? Is there a date or something similar somewhere in the data? There would have to be something specific in each dataset that VBA could use to determine which dataset is the most current. By specific I mean that VBA would need to know not only what to look for, but where to look for it.

3 - You said: "...I want Excel to decide, on the columns and rows that are the same, which data is most current..." Do the rows and columns that we would be comparing intersect? Here's why I ask: Every cell in a given row will also be a cell in a given column. Let's say Row 3 is the "same" on Sheet1 and Sheet2 and we decide to keep the data from Sheet1. However, Column B on Sheet2 is more current than Column B on Sheet1, so we're going to keep the Sheet2 column. Which cell B3 wins? The one from the most current of the 2 rows or the one from the most current of the 2 columns? See where I'm going with this? Intersections could be troublesome.

I'm sure I would have many more questions once I saw the actual sheets, but that's enough for now.


Report Offensive Follow Up For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: Merging separate Excel docs

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software