Dim rngA As Range, rngE As Range
Set rngA = Sheets("Logbook").Range("A9:A10009")
Set rngE = Sheets("Logbook").Range("E9:E10009")
x = (Application.SumIf(rngA, ">=" & Range("A5") - 6, rngE) - _
Application.SumIf(rngA, ">" & Range("A5"), rngE)) / 24
Not sure what you are doing with it, but this should do what you want I think?
decValue = evaluate("=(SUMIF(Logbook!$A9:$A10009,"">=""&A5-6,Logbook!$E9:$E10009)-SUMIF(Logbook!$A9:$A10009,"">""&A5,Logbook!$E9:$E10009))/24")
Hope that helps.