I tried to do the it without the helper cell with this but the result always return 0.Code:=SUMPRODUCT(($A$2:$A$20<>"")*(AND($C$2:$C$20>($E$2-($F$2/86400)),$C$2:$C$20<($F$2/86400+$E$2))))
=SUMPRODUCT(($A$2:$A$20<>"")*($C$2:$C$20>($E$2-($F$2/86400))*($C$2:$C$20<($F$2/86400+$E$2)))