For lm_c2 = 5 To 100
If xlsheet_l.Cells(11, 1) = xlSheet.Cells(lm_c2, 1) Then
Set sourcerng_lm1 = Union(xlSheet.Cells(lm_c2, 9), xlSheet.Cells(lm_c2, 11), xlSheet.Cells(lm_c2, 13), xlSheet.Cells(lm_c2, 15), xlSheet.Cells(lm_c2, 17), xlSheet.Cells(lm_c2, 19), xlSheet.Cells(lm_c2, 21), xlSheet.Cells(lm_c2, 23), xlSheet.Cells(lm_c2, 25), xlSheet.Cells(lm_c2, 27), xlSheet.Cells(lm_c2, 29), xlSheet.Cells(lm_c2, 31), xlSheet.Cells(lm_c2, 33), xlSheet.Cells(lm_c2, 35), xlSheet.Cells(lm_c2, 37), xlSheet.Cells(lm_c2, 39), xlSheet.Cells(lm_c2, 41))
sourcerng_lm1.Copy xlsheet_l.Cells(11, 6)
Set sourcerng_lm2 = Union(xlSheet.Cells(lm_c2, 10), xlSheet.Cells(lm_c2, 12), xlSheet.Cells(lm_c2, 14), xlSheet.Cells(lm_c2, 16), xlSheet.Cells(lm_c2, 18), xlSheet.Cells(lm_c2, 20), xlSheet.Cells(lm_c2, 22), xlSheet.Cells(lm_c2, 24), xlSheet.Cells(lm_c2, 26), xlSheet.Cells(lm_c2, 28), xlSheet.Cells(lm_c2, 30), xlSheet.Cells(lm_c2, 32), xlSheet.Cells(lm_c2, 34), xlSheet.Cells(lm_c2, 36), xlSheet.Cells(lm_c2, 38), xlSheet.Cells(lm_c2, 40), xlSheet.Cells(lm_c2, 42))
sourcerng_lm2.Copy xlsheet_l.Cells(12, 6)
End If
Next lm_c2
For lm_c3 = 5 To 100
If xlsheet_l.Cells(14, 1) = xlSheet.Cells(lm_c3, 1) Then
Set sourcerng_lm1 = Union(xlSheet.Cells(lm_c3, 9), xlSheet.Cells(lm_c3, 11), xlSheet.Cells(lm_c3, 13), xlSheet.Cells(lm_c3, 15), xlSheet.Cells(lm_c3, 17), xlSheet.Cells(lm_c3, 19), xlSheet.Cells(lm_c3, 21), xlSheet.Cells(lm_c3, 23), xlSheet.Cells(lm_c3, 25), xlSheet.Cells(lm_c3, 27), xlSheet.Cells(lm_c3, 29), xlSheet.Cells(lm_c3, 31), xlSheet.Cells(lm_c3, 33), xlSheet.Cells(lm_c3, 35), xlSheet.Cells(lm_c3, 37), xlSheet.Cells(lm_c3, 39), xlSheet.Cells(lm_c3, 41))
sourcerng_lm1.Copy xlsheet_l.Cells(14, 6)
Set sourcerng_lm2 = Union(xlSheet.Cells(lm_c3, 10), xlSheet.Cells(lm_c3, 12), xlSheet.Cells(lm_c3, 14), xlSheet.Cells(lm_c3, 16), xlSheet.Cells(lm_c3, 18), xlSheet.Cells(lm_c3, 20), xlSheet.Cells(lm_c3, 22), xlSheet.Cells(lm_c3, 24), xlSheet.Cells(lm_c3, 26), xlSheet.Cells(lm_c3, 28), xlSheet.Cells(lm_c3, 30), xlSheet.Cells(lm_c3, 32), xlSheet.Cells(lm_c3, 34), xlSheet.Cells(lm_c3, 36), xlSheet.Cells(lm_c3, 38), xlSheet.Cells(lm_c3, 40), xlSheet.Cells(lm_c3, 42))
sourcerng_lm2.Copy xlsheet_l.Cells(15, 6)
End If
Next lm_c3
For lm_c4 = 5 To 100
If xlsheet_l.Cells(17, 1) = xlSheet.Cells(lm_c4, 1) Then
Set sourcerng_lm1 = Union(xlSheet.Cells(lm_c4, 9), xlSheet.Cells(lm_c4, 11), xlSheet.Cells(lm_c4, 13), xlSheet.Cells(lm_c4, 15), xlSheet.Cells(lm_c4, 17), xlSheet.Cells(lm_c4, 19), xlSheet.Cells(lm_c4, 21), xlSheet.Cells(lm_c4, 23), xlSheet.Cells(lm_c4, 25), xlSheet.Cells(lm_c4, 27), xlSheet.Cells(lm_c4, 29), xlSheet.Cells(lm_c4, 31), xlSheet.Cells(lm_c4, 33), xlSheet.Cells(lm_c4, 35), xlSheet.Cells(lm_c4, 37), xlSheet.Cells(lm_c4, 39), xlSheet.Cells(lm_c4, 41))
sourcerng_lm1.Copy xlsheet_l.Cells(17, 6)
Set sourcerng_lm2 = Union(xlSheet.Cells(lm_c4, 10), xlSheet.Cells(lm_c4, 12), xlSheet.Cells(lm_c4, 14), xlSheet.Cells(lm_c4, 16), xlSheet.Cells(lm_c4, 18), xlSheet.Cells(lm_c4, 20), xlSheet.Cells(lm_c4, 22), xlSheet.Cells(lm_c4, 24), xlSheet.Cells(lm_c4, 26), xlSheet.Cells(lm_c4, 28), xlSheet.Cells(lm_c4, 30), xlSheet.Cells(lm_c4, 32), xlSheet.Cells(lm_c4, 34), xlSheet.Cells(lm_c4, 36), xlSheet.Cells(lm_c4, 38), xlSheet.Cells(lm_c4, 40), xlSheet.Cells(lm_c4, 42))
sourcerng_lm2.Copy xlsheet_l.Cells(18, 6)
End If
Next lm_c4
For lm_c5 = 5 To 100
If xlsheet_l.Cells(20, 1) = xlSheet.Cells(lm_c5, 1) Then
Set sourcerng_lm1 = Union(xlSheet.Cells(lm_c5, 9), xlSheet.Cells(lm_c5, 11), xlSheet.Cells(lm_c5, 13), xlSheet.Cells(lm_c5, 15), xlSheet.Cells(lm_c5, 17), xlSheet.Cells(lm_c5, 19), xlSheet.Cells(lm_c5, 21), xlSheet.Cells(lm_c5, 23), xlSheet.Cells(lm_c5, 25), xlSheet.Cells(lm_c5, 27), xlSheet.Cells(lm_c5, 29), xlSheet.Cells(lm_c5, 31), xlSheet.Cells(lm_c5, 33), xlSheet.Cells(lm_c5, 35), xlSheet.Cells(lm_c5, 37), xlSheet.Cells(lm_c5, 39), xlSheet.Cells(lm_c5, 41))
sourcerng_lm1.Copy xlsheet_l.Cells(20, 6)
Set sourcerng_lm2 = Union(xlSheet.Cells(lm_c5, 10), xlSheet.Cells(lm_c5, 12), xlSheet.Cells(lm_c5, 14), xlSheet.Cells(lm_c5, 16), xlSheet.Cells(lm_c5, 18), xlSheet.Cells(lm_c5, 20), xlSheet.Cells(lm_c5, 22), xlSheet.Cells(lm_c5, 24), xlSheet.Cells(lm_c5, 26), xlSheet.Cells(lm_c5, 28), xlSheet.Cells(lm_c5, 30), xlSheet.Cells(lm_c5, 32), xlSheet.Cells(lm_c5, 34), xlSheet.Cells(lm_c5, 36), xlSheet.Cells(lm_c5, 38), xlSheet.Cells(lm_c5, 40), xlSheet.Cells(lm_c5, 42))
sourcerng_lm2.Copy xlsheet_l.Cells(21, 6)
End If
Next lm_c5
For lm_c6 = 5 To 100
If xlsheet_l.Cells(23, 1) = xlSheet.Cells(lm_c6, 1) Then
Set sourcerng_lm1 = Union(xlSheet.Cells(lm_c6, 9), xlSheet.Cells(lm_c6, 11), xlSheet.Cells(lm_c6, 13), xlSheet.Cells(lm_c6, 15), xlSheet.Cells(lm_c6, 17), xlSheet.Cells(lm_c6, 19), xlSheet.Cells(lm_c6, 21), xlSheet.Cells(lm_c6, 23), xlSheet.Cells(lm_c3, 25), xlSheet.Cells(lm_c6, 27), xlSheet.Cells(lm_c3, 29), xlSheet.Cells(lm_c6, 31), xlSheet.Cells(lm_c6, 33), xlSheet.Cells(lm_c6, 35), xlSheet.Cells(lm_c6, 37), xlSheet.Cells(lm_c3, 39), xlSheet.Cells(lm_c6, 41))
sourcerng_lm1.Copy xlsheet_l.Cells(23, 6)
Set sourcerng_lm2 = Union(xlSheet.Cells(lm_c6, 10), xlSheet.Cells(lm_c6, 12), xlSheet.Cells(lm_c6, 14), xlSheet.Cells(lm_c6, 16), xlSheet.Cells(lm_c6, 18), xlSheet.Cells(lm_c6, 20), xlSheet.Cells(lm_c6, 22), xlSheet.Cells(lm_c6, 24), xlSheet.Cells(lm_c3, 26), xlSheet.Cells(lm_c6, 28), xlSheet.Cells(lm_c3, 30), xlSheet.Cells(lm_c6, 32), xlSheet.Cells(lm_c6, 34), xlSheet.Cells(lm_c6, 36), xlSheet.Cells(lm_c6, 38), xlSheet.Cells(lm_c3, 40), xlSheet.Cells(lm_c6, 42))
sourcerng_lm2.Copy xlsheet_l.Cells(24, 6)
End If
Next lm_c6
Bookmarks