Function SUMBETWEEN(r As Range, StartNum As Long, EndNum As Long) As Long
Dim AR() As Variant: AR = r.Value
Dim b As Boolean: b = False
Dim Total As Long: Total = 0
For i = LBound(AR) To UBound(AR, 2) - 1
If b Then Total = Total + AR(1, i)
If AR(1, i) = StartNum Then b = True
If AR(1, i + 1) = EndNum Then b = False
Next i
SUMBETWEEN = Total
End Function