I didn't go any farther because I don't really k now what you need. IOW, how much of the data on Sheets("DATA") is just used to help find the required info on Sheets("pivot") and how much do you need ellewhere?
All these function only use columns C and F on Sheets("DATA")
Option Explicit
Public Const BankHolidaysSheet As String = "Sheet2"
Public Function IsBankHoliday(aDate As Date) As Boolean
Static BankHolidays As Variant
Dim i As Long
If Not IsArray(BankHolidays) Then
With Sheets(BankHolidaysSheet)
BankHolidays = Range(.Range("a1"), .Range("A1").End(xlDown)).Value
End With
End If
For i = LBound(BankHolidays) To UBound(BankHolidays)
If BankHolidays(i, 1) = aDate Then
IsBankHoliday = True
Exit Function
End If
Next i
End Function
Public Function IsWeekEnd(aDate As Date) As Boolean
IsWeekEnd = (Weekday(aDate) = 1 Or Weekday(aDate) = 7)
End Function
Public Function IsDuringRegularHours(aDateTime As Date) As Boolean
Const StartTime As Double = 0.333333333333333 'TimeValue("08:00:00")
Const QuitTime As Double = 0.833333333333333 'TimeValue("20:00:00")
Dim aTime As Double
aTime = TimeValue(aDateTime)
IsDuringRegularHours = (aTime >= StartTime And aTime < QuitTime)
End Function
Public Function AllHours(StartTime As Date, QuitTime As Date) As String
Dim TotHrs As Double
Dim Hrs As String
Dim Mins As Variant
TotHrs = (QuitTime - StartTime) * 24
Hrs = WorksheetFunction.RoundDown(TotHrs, 0)
Mins = (TotHrs * 60) Mod 60
If Mins < 10 Then Mins = "0" & Mins
AllHours = Hrs & ":" & Mins
End Function
ATT, it looks like the only thing left is to determine Core hours. But, I bet you need yet more categories of hours broken out.