PC Review


Reply
Thread Tools Rate Thread

Duplicating Changes from Column A and B of Master Workbook to ColumnA and B of Other Workbooks - - Please help me, I can save days if my problem

 
 
jhong
Guest
Posts: n/a
 
      7th Mar 2008
Hi Everyone,

I have this report that takes 3 days to finish. I have 3 workbooks
with several sheets and a master file with a single sheet named ZCA
which I used for data update only. All sheets are identical. My
concern is on Column A and B of each worksheet. Column A is where the
account code is placed and Column B is the equivalent account name.

New account code/account name is added every month, as a result i need
to take effect the changes manually to all other sheets too. The row
reference cell should be identical to all sheets also. I used only the
Zca to check changes then afterwards I implement changes to all other
workbooks/sheets manually.

Is there a way for me to take effect changes in Col A and B from ZCA
sheet to all other sheets from other workbooks?


Many many thanks in advance!

Jerome
 
Reply With Quote
 
 
 
 
Mike H.
Guest
Posts: n/a
 
      10th Mar 2008
Here is how you could do it:
There are a couple things this assumes. Only "master" will have rows that
may be inserted. If that is not the case, then this will mess you up big
time!

Sub MakeSame()
Dim DataArray(50000, 4) As Variant
Dim Fnd As Double
'pick the right line:
Windows("master.xls").Activate
'or
Sheets("master").Select

x = 1
Do While True
If Cells(x, 1).Value = Empty Then Exit Do
Fnd = Fnd + 1
DataArray(Fnd, 1) = Cells(x, 1).Value
DataArray(Fnd, 2) = Cells(x, 2).Value
DataArray(Fnd, 3) = x
x = x + 1
Loop

For Y = 1 To 2
If Y = 1 Then
'pick the right line below:
Windows("sheet2.xls").Activate
'or
Sheets("sheet2").Select
ElseIf Y = 2 Then
'pick the right line below:
Windows("sheet3.xls").Activate
'or
Sheets("sheet3").Select
End If
For x = 1 To Fnd
If Cells(x, 1).Value <> DataArray(x, 1) Then
'insert a row and make it match
Rows(x & ":" & x).Select
Selection.Insert Shift:=xlDown,
CopyOrigin:=xlFormatFromLeftOrAbove
Cells(x, 1).Value = DataArray(x, 1)
Cells(x, 2).Value = DataArray(x, 2)
End If
Next
Next

End Sub


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Updating a master workbook with 80 workbooks La La Lara Microsoft Excel Misc 1 13th Mar 2008 03:09 PM
Duplicating Changes from Column A and B of Master Workbook to ColumnA and B of Other Workbooks - - Please help me, I can save days if my problem jhong Microsoft Excel Programming 0 7th Mar 2008 11:23 AM
Search a column, enable input fields, save to row & columna, reset =?Utf-8?B?TWlrZSAiTXJNdW5rYSIgR2lsbGluZ2hhbQ==?= Microsoft Excel Programming 1 6th Jul 2007 01:28 PM
Combine workbooks into one master workbook. EKB Microsoft Excel Programming 2 6th May 2006 11:08 AM
Importing Workbooks into a Master Workbook =?Utf-8?B?cmF5MjQ0MTkw?= Microsoft Excel Worksheet Functions 0 12th Jan 2006 07:40 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:59 PM.