PDA

View Full Version : Consolidating Workbooks



drums4monty
12-18-2014, 04:23 AM
Hi

I have 3 workbooks, Pending 1, Pending 2, Pending 3, and would like to create a new workbook, Pending Consolidated, using the information from the other 3 workbooks (i.e. take the information from all of the other 3 workbooks and merge into one workbook), to make on list.

As I update the 3 other workbooks I want the Pending Consolidated workbook to reflect the changes, i.e. information changed, new information added or information deleted. As information is deleted ideally the gap created in Pending Consolidated will be closed and new information added to the other 3 workbooks would get added to the bottom of Pending Consolidated.

The information will be held in A2 (Ref), B2 (Name), C3 (Post Code).

Is this possible?

This is way beyond me and is giving me a headache just writing it :)

SamT
12-18-2014, 06:40 AM
Terminology = Call the one book "Consolidated" and the other three "Pending."

First decide if you want Consolidated to "Pull" the information from the Pendings or have the three Pendings "Push" it into Consolidated. Obviously, using "Push" means three sets of code to maintain.

Pulling the data:
When Consolidated opens, it clears the existing contents and imports the new data. Uses WorkbookOpen Event. Have a "Refresh" Button.

Only Pulls data from saved Pendings. Set up AutoSave on them

Pushing the data:
Pending's Cells must be read before deleting their contents because, the identical "Ref" or "Name" must be found and that Row deleted in Consolidated. This also closes the gaps.
When Cells are edited, the same "Ref", or "name" Row must be found in Consolidated and made the same.
When new Rows are added, they must be added to Consolidated.

[Selection_Change is used to save the three values on that Row for finding old data on Consolidated. Workbook_Change must save the new data for use on Consolidated]
Only Pushes Data into the unopened copy of Consolidated.



Has this helped clear the view?

drums4monty
12-18-2014, 06:53 AM
Thanks for the reply Sam. By the sounds of it 'Pull' sounds the better option I think. Still beyond me but has given me an insight of what goes into coding.