QUERY('Sales Data'!A:Q; "Select P where (F=0 and A="&A2&" and O="&C2&")")
QUERY(;;0)
C2
к нужному формату =date '"&TEXT(C2;"yyyy-MM-dd")&"'
=IFNA(
QUERY(
'Sales Data'!A:Q;
"Select P where (F=0 and A="&A2&" and O=date '"&TEXT(C2;"yyyy-MM-dd")&"')";
0
);
)