'
' Summary_Update Macro
'
'
'3D Work
Application.ScreenUpdating = True
Dim ProjectMinDate As Long
Dim SummaryMinDate As Long
Dim NumofColumns As Long
Dim SummaryMaxDate As Long
Dim ProjectMaxDate As Long
Dim DaysofWork As Variant
Dim ArtistsNeeded As Variant
SummaryMinDate = 99999999
SummaryMaxDate = 1
DaysofWork = 0
ArtistsNeeded = 0
For i = 4 To Sheets.Count
Sheets(i).Activate
Cells.Find(What:="3D Start Date Week Commencing", After:=ActiveCell, _
LookIn:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False).Activate
ActiveCell.Offset(0, 1).Range("A1").Select
If Not IsDate(ActiveCell.Value) = False Then
ProjectMinDate = ActiveCell.Value
If ProjectMinDate < SummaryMinDate Then
SummaryMinDate = ProjectMinDate
End If
Selection.End(xlToRight).Select
ProjectMaxDate = ActiveCell.Value
If ProjectMaxDate > SummaryMaxDate Then
SummaryMaxDate = ProjectMaxDate
End If
End If
Next
Sheets(2).Activate
Cells.Find(What:="3D Start Date Week Commencing", After:=ActiveCell, _
LookIn:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False).Activate
ActiveCell.Offset(0, 1).Range("A1").Select
NumofColumns = ((SummaryMaxDate - SummaryMinDate) / 7) - 1
For J = 1 To NumofColumns + 2
ActiveCell.Value = SummaryMinDate
[B] Selection.NumberFormat = "dd/mm/yyyy"[/B]
[B] Set LookUpDate = ActiveCell[/B]
[B] For k = 4 To Sheets.Count[/B]
[B] Sheets(k).Activate[/B]
[B] Cells.Find(What:="3D Start Date Week Commencing", After:=ActiveCell, _[/B]
[B] LookIn:=xlValues, LookAt:=xlPart, SearchOrder:=xlByRows, _[/B]
[B] SearchDirection:=xlNext, MatchCase:=False).Activate[/B]
[B] On Error GoTo DateNotFound1[/B]
[B] Rows(ActiveCell.Row).Cells.Find(What:=CStr(LookUpDate), After:=ActiveCell, LookIn:=xlValues, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False).Activate[/B]
ActiveCell.Offset(1, 0).Range("A1").Select
DaysofWork = DaysofWork + ActiveCell.Value
ActiveCell.Offset(4, 0).Range("A1").Select
ArtistsNeeded = ArtistsNeeded + ActiveCell.Value
Label1:
Next
Sheets(2).Activate
ActiveCell.Offset(1, 0).Range("A1").Select
ActiveCell.Value = DaysofWork
ActiveCell.Offset(1, 0).Range("A1").Select
ActiveCell.Value = ArtistsNeeded
ActiveCell.Offset(-2, 1).Range("A1").Select
ArtistsNeeded = 0
DaysofWork = 0
SummaryMinDate = SummaryMinDate + 7
Next
'Moving onto Match Move
ProjectMinDate = 0
SummaryMinDate = 99999999
NumofColumns = 0
SummaryMaxDate = 1
ProjectMaxDate = 0
DaysofWork = 0
ArtistsNeeded = 0
For i = 4 To Sheets.Count
Sheets(i).Activate
Cells.Find(What:="Match Move Start Date Week Commencing", After:=ActiveCell, _
LookIn:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False).Activate
ActiveCell.Offset(0, 1).Range("A1").Select
If Not IsDate(ActiveCell.Value) = False Then
ProjectMinDate = ActiveCell.Value
If ProjectMinDate < SummaryMinDate Then
SummaryMinDate = ProjectMinDate
End If
Selection.End(xlToRight).Select
ProjectMaxDate = ActiveCell.Value
If ProjectMaxDate > SummaryMaxDate Then
SummaryMaxDate = ProjectMaxDate
End If
End If
Next
Sheets(2).Activate
Cells.Find(What:="Match Move Start Date Week Commencing", After:=ActiveCell, _
LookIn:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False).Activate
ActiveCell.Offset(0, 1).Range("A1").Select
NumofColumns = ((SummaryMaxDate - SummaryMinDate) / 7) - 1
For J = 1 To NumofColumns + 2
ActiveCell.Value = SummaryMinDate
Selection.NumberFormat = "dd/mm/yyyy"
Set LookUpDate = ActiveCell
For k = 4 To Sheets.Count
Sheets(k).Activate
Cells.Find(What:="Match Move Start Date Week Commencing", After:=ActiveCell, _
LookIn:=xlValues, LookAt:=xlPart, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False).Activate
On Error GoTo DateNotFound2
Rows(ActiveCell.Row).Find(What:=LookUpDate).Activate
ActiveCell.Offset(1, 0).Range("A1").Select
DaysofWork = DaysofWork + ActiveCell.Value
ActiveCell.Offset(4, 0).Range("A1").Select
ArtistsNeeded = ArtistsNeeded + ActiveCell.Value
Label2:
Next
Sheets(2).Activate
ActiveCell.Offset(1, 0).Range("A1").Select
ActiveCell.Value = DaysofWork
ActiveCell.Offset(1, 0).Range("A1").Select
ActiveCell.Value = ArtistsNeeded
ActiveCell.Offset(-2, 1).Range("A1").Select
ArtistsNeeded = 0
DaysofWork = 0
SummaryMinDate = SummaryMinDate + 7
Next
'Moving Onto Roto Prep
ProjectMinDate = 0
SummaryMinDate = 99999999
NumofColumns = 0
SummaryMaxDate = 1
ProjectMaxDate = 0
DaysofWork = 0
ArtistsNeeded = 0
For i = 4 To Sheets.Count
Sheets(i).Activate
Cells.Find(What:="Roto Prep Start Date Week Commencing", After:=ActiveCell, _
LookIn:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False).Activate
ActiveCell.Offset(0, 1).Range("A1").Select
If Not IsDate(ActiveCell.Value) = False Then
ProjectMinDate = ActiveCell.Value
If ProjectMinDate < SummaryMinDate Then
SummaryMinDate = ProjectMinDate
End If
Selection.End(xlToRight).Select
ProjectMaxDate = ActiveCell.Value
If ProjectMaxDate > SummaryMaxDate Then
SummaryMaxDate = ProjectMaxDate
End If
End If
Next
Sheets(2).Activate
Cells.Find(What:="Roto Prep Start Date Week Commencing", After:=ActiveCell, _
LookIn:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False).Activate
ActiveCell.Offset(0, 1).Range("A1").Select
NumofColumns = ((SummaryMaxDate - SummaryMinDate) / 7) - 1
For J = 1 To NumofColumns + 2
ActiveCell.Value = SummaryMinDate
Selection.NumberFormat = "dd/mm/yyyy"
Set LookUpDate = ActiveCell
For k = 4 To Sheets.Count
Sheets(k).Activate
Cells.Find(What:="Roto Prep Start Date Week Commencing", After:=ActiveCell, _
LookIn:=xlValues, LookAt:=xlPart, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False).Activate
On Error GoTo DateNotFound3
Rows(ActiveCell.Row).Find(What:=LookUpDate).Activate
ActiveCell.Offset(1, 0).Range("A1").Select
DaysofWork = DaysofWork + ActiveCell.Value
ActiveCell.Offset(4, 0).Range("A1").Select
ArtistsNeeded = ArtistsNeeded + ActiveCell.Value
Label3:
Next
Sheets(2).Activate
ActiveCell.Offset(1, 0).Range("A1").Select
ActiveCell.Value = DaysofWork
ActiveCell.Offset(1, 0).Range("A1").Select
ActiveCell.Value = ArtistsNeeded
ActiveCell.Offset(-2, 1).Range("A1").Select
ArtistsNeeded = 0
DaysofWork = 0
SummaryMinDate = SummaryMinDate + 7
Next
' Moving Onto DMP
ProjectMinDate = 0
SummaryMinDate = 99999999
NumofColumns = 0
SummaryMaxDate = 1
ProjectMaxDate = 0
DaysofWork = 0
ArtistsNeeded = 0
For i = 4 To Sheets.Count
Sheets(i).Activate
Cells.Find(What:="DMP Start Date Week Commencing", After:=ActiveCell, _
LookIn:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False).Activate
ActiveCell.Offset(0, 1).Range("A1").Select
If Not IsDate(ActiveCell.Value) = False Then
ProjectMinDate = ActiveCell.Value
If ProjectMinDate < SummaryMinDate Then
SummaryMinDate = ProjectMinDate
End If
Selection.End(xlToRight).Select
ProjectMaxDate = ActiveCell.Value
If ProjectMaxDate > SummaryMaxDate Then
SummaryMaxDate = ProjectMaxDate
End If
End If
Next
Sheets(2).Activate
Cells.Find(What:="DMP Start Date Week Commencing", After:=ActiveCell, _
LookIn:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False).Activate
ActiveCell.Offset(0, 1).Range("A1").Select
NumofColumns = ((SummaryMaxDate - SummaryMinDate) / 7) - 1
For J = 1 To NumofColumns + 2
ActiveCell.Value = SummaryMinDate
Selection.NumberFormat = "dd/mm/yyyy"
Set LookUpDate = ActiveCell
For k = 4 To Sheets.Count
Sheets(k).Activate
Cells.Find(What:="DMP Start Date Week Commencing", After:=ActiveCell, _
LookIn:=xlValues, LookAt:=xlPart, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False).Activate
On Error GoTo DateNotFound4
Rows(ActiveCell.Row).Find(What:=LookUpDate).Activate
ActiveCell.Offset(1, 0).Range("A1").Select
DaysofWork = DaysofWork + ActiveCell.Value
ActiveCell.Offset(4, 0).Range("A1").Select
ArtistsNeeded = ArtistsNeeded + ActiveCell.Value
Label4:
Next
Sheets(2).Activate
ActiveCell.Offset(1, 0).Range("A1").Select
ActiveCell.Value = DaysofWork
ActiveCell.Offset(1, 0).Range("A1").Select
ActiveCell.Value = ArtistsNeeded
ActiveCell.Offset(-2, 1).Range("A1").Select
ArtistsNeeded = 0
DaysofWork = 0
SummaryMinDate = SummaryMinDate + 7
Next
' Moving Onto Comp
ProjectMinDate = 0
SummaryMinDate = 99999999
NumofColumns = 0
SummaryMaxDate = 1
ProjectMaxDate = 0
DaysofWork = 0
ArtistsNeeded = 0
For i = 4 To Sheets.Count
Sheets(i).Activate
Cells.Find(What:="Comp Start Date Week Commencing", After:=ActiveCell, _
LookIn:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False).Activate
ActiveCell.Offset(0, 1).Range("A1").Select
If Not IsDate(ActiveCell.Value) = False Then
ProjectMinDate = ActiveCell.Value
If ProjectMinDate < SummaryMinDate Then
SummaryMinDate = ProjectMinDate
End If
Selection.End(xlToRight).Select
ProjectMaxDate = ActiveCell.Value
If ProjectMaxDate > SummaryMaxDate Then
SummaryMaxDate = ProjectMaxDate
End If
End If
Next
Sheets(2).Activate
Cells.Find(What:="Comp Start Date Week Commencing", After:=ActiveCell, _
LookIn:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False).Activate
ActiveCell.Offset(0, 1).Range("A1").Select
NumofColumns = ((SummaryMaxDate - SummaryMinDate) / 7) - 1
For J = 1 To NumofColumns + 2
ActiveCell.Value = SummaryMinDate
Selection.NumberFormat = "dd/mm/yyyy"
Set LookUpDate = ActiveCell
For k = 4 To Sheets.Count
Sheets(k).Activate
Cells.Find(What:="Comp Start Date Week Commencing", After:=ActiveCell, _
LookIn:=xlValues, LookAt:=xlPart, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False).Activate
On Error GoTo DateNotFound5
Rows(ActiveCell.Row).Find(What:=LookUpDate).Activate
ActiveCell.Offset(1, 0).Range("A1").Select
DaysofWork = DaysofWork + ActiveCell.Value
ActiveCell.Offset(4, 0).Range("A1").Select
ArtistsNeeded = ArtistsNeeded + ActiveCell.Value
Label5:
Next
Sheets(2).Activate
ActiveCell.Offset(1, 0).Range("A1").Select
ActiveCell.Value = DaysofWork
ActiveCell.Offset(1, 0).Range("A1").Select
ActiveCell.Value = ArtistsNeeded
ActiveCell.Offset(-2, 1).Range("A1").Select
ArtistsNeeded = 0
DaysofWork = 0
SummaryMinDate = SummaryMinDate + 7
Next
Exit Sub
DateNotFound1:
Resume Label1:
DateNotFound2:
Resume Label2:
DateNotFound3:
Resume Label3:
DateNotFound4:
Resume Label4:
DateNotFound5:
Resume Label5:
'
End Sub