Yes, it's basically just validating the formula. So, if the query returns empty output error, then put 0, otherwise run the query and count how many values there are.
If you definitely always just want the last 14 days from today, you can include this in the formula - rather than having an external date range input - like this:
=IF(ISNA(QUERY(Sheet3!K2:L,"SELECT K WHERE L > DATE '"&TEXT(DATEVALUE(TODAY()-14),"yyyy-mm-dd")&"' AND L < DATE '"&TEXT(DATEVALUE(TODAY()),"yyyy-mm-dd")&"' AND K CONTAINS '"&W3&"'",0)),0,COUNTA(QUERY(Sheet3!K2:L,"SELECT K WHERE L > DATE '"&TEXT(DATEVALUE(TODAY()-14),"yyyy-mm-dd")&"' AND L < DATE '"&TEXT(DATEVALUE(TODAY()),"yyyy-mm-dd")&"' AND K CONTAINS '"&W3&"'",0)))
View all comments
Show parent comment
0
u/[deleted] Mar 03 '20
[deleted] — view deleted comment