вместо вашего:
=COUNTIFS($A$18:$A, ">"&Dates!$C$4+TIME(Dates!$C$3,0,0)-1,
$D$18:$D, $D35,
$H$18:$H, $H35,
$Y$18:$Y, "")
используйте:
=COUNTA(IFERROR(QUERY(FILTER(ROW($A$18:$A),
$A$18:$A>Dates!$C$4+TIME(Dates!$C$3,0,0)-1,
$D$18:$D=$D35,
$H$18:$H=$H35,
$Y$18:$Y=""), "limit 10")))