View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
PatK PatK is offline
external usenet poster
 
Posts: 96
Default Adding row data from one Excel file, to another, when not exis

Sorry..couldn't wait. I gave it a shot and it worked quite well (so much
better than the NO PROGRESS I had been making. Here is the code, thus far.
Only changes were for the actual WS names, which I abbreviated in the initial
post. It definitely insert rows from one page to the other. I have to
reduce the amount of data, because initially, all I wanted was the ML_ID to
go over (I have another function that populates cells after column A). But
man...this is so great...I shall do a bit of auditing, and let ya
know...thanks Joel

Patk

Sub Synchronization()

With Sheets("Sunset-Plan")
LastRow = .Range("A" & Rows.Count).End(xlUp).Row
NewRow = LastRow + 1
End With
With Sheets("HPSC")
MLRowCount = 1
Do While .Range("A" & MLRowCount) < ""
ML_ID = .Range("A" & MLRowCount)
With Sheets("Sunset-Plan")
Set c = .Columns("A").Find(what:=ML_ID, LookIn:=xlValues,
lookat:=xlWhole)
If c Is Nothing Then
Sheets("HPSC").Rows(MLRowCount).Copy _
Destination:=.Rows(NewRow)
NewRow = NewRow + 1
End If
End With
MLRowCount = MLRowCount + 1
Loop
End With

End Sub