LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 471
Default Duplicating Changes from Column A and B of Master Workbook to Colu

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


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Updating a master workbook with 80 workbooks La La Lara Excel Discussion (Misc queries) 1 March 13th 08 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 Excel Programming 0 March 7th 08 11:23 AM
Search a column, enable input fields, save to row & columna, reset Mike MrMunka Gillingham Excel Programming 1 July 6th 07 01:28 PM
Combine workbooks into one master workbook. EKB Excel Programming 2 May 6th 06 11:08 AM
Importing Workbooks into a Master Workbook ray244190 Excel Worksheet Functions 0 January 12th 06 07:40 PM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"