[VBA]
Option Explicit
Sub Test()
Application.ScreenUpdating = False
Dim LTD_xls As Worksheet, Open_dif As Worksheet
Dim rLTD As Range, rOPN As Range
Dim ltdLastRow As Integer
Set LTD_xls = Workbooks("LTD Open.xls").Worksheets("open")
Set Open_dif = Workbooks("open.xls").Worksheets("open")
ltdLastRow = LTD_xls.Range("A1").End(xlDown).Row
For Each rLTD In LTD_xls.Range("$A$2:$A$5000")
If IsEmpty(rLTD) Then Exit For
For Each rOPN In Open_dif.Range("$A$2:$A$5000")
If IsEmpty(rOPN) Then Exit For
If (rOPN = rLTD) Then
'syncronize cells in range M through Z in between "LTD open" and "open.dif" based on
'"open.dif"s conents.
rOPN.Range("M" & rOPN.Row & ":Z" & rOPN.Row).Copy rLTD.Range("M" & rLTD.Row & ":Z" & rLTD.Row)
End If
Next rOPN
Next rLTD
Application.ScreenUpdating = True
End Sub
[/VBA]
1) I'm trying to synchronize 2 sheets, but for some reason first row is never updated, why?
2) If "work order" on LTD_xls doesn't exist on Open_dif i would like to remove the whole row, any suggestions on how do i handle that?
P.S. i can't attach more than 1 file, but layout in "LTD Open.xls" is the same, it's only the content that's different. "Open.xls" is attached to this message.
Thanks!