See notes in my signature for how to implement. Hope this helps.
Sub MoveToIndy()
Dim wsTotal As Worksheet, ws1 As Worksheet, ws2 As Worksheet
Dim rngCell As Range, rngSource As Range, rngDest1 As Range
Dim rngDest2 As Range, rngToCopy As Range
Dim lngLastCol As Long
Set wsTotal = ActiveWorkbook.Sheets("Total Jobs")
Set ws1 = ActiveWorkbook.Sheets("Store1")
Set ws2 = ActiveWorkbook.Sheets("Store2")
With Application
.ScreenUpdating = False
.EnableEvents = False
.Calculation = xlCalculationManual
End With
With wsTotal
Set rngSource = .Range("B2", .Range("B2").End(xlDown))
lngLastCol = .Cells(1, .Columns.Count).End(xlToLeft).Column
End With
For Each rngCell In rngSource
With wsTotal
Set rngToCopy = .Range(.Cells(rngCell.Row, 1), .Cells(rngCell.Row, lngLastCol))
End With
If rngCell.Value = "Store1" Then
With ws1
Set rngDest1 = .Range("B20000").End(xlUp).Offset(1, -1).Resize(1, lngLastCol)
End With
rngDest1.Value = rngToCopy.Value
Else
With ws2
Set rngDest2 = .Range("B20000").End(xlUp).Offset(1, -1).Resize(1, lngLastCol)
End With
rngDest2.Value = rngToCopy.Value
End If
Next
With Application
.ScreenUpdating = True
.EnableEvents = True
.Calculation = xlCalculationAutomatic
End With
End Sub
Bookmarks