'Do not retrieve query if empty output

In this sheet I'm working on, I'd like only the applicable data to show on the Teacher1Results tab, not the #N/A for empty output. Secondly, is it possible to make a >= into, for example >=4 but also <=8? https://docs.google.com/spreadsheets/d/1ToeDdavA-red9tH40jqFmcv8soQ-pgwICcZPZOUUHNY/edit?usp=sharing Thank you so much in advance for helping such a noob. I'm learning every time I get an answer and really appreciate the time you all spend helping people like me!



Solution 1:[1]

for Teacher1Results!A13 for example try:

=IFERROR(QUERY(Teacher1!A17:P17, "select A where P >=9 and P <20")

update:

delete everything in range Teacher1Results!A11:A and use this in Teacher1Results!A11:

=FILTER(Teacher1!A15:A, Teacher1!P15:P>=9, Teacher1!P15:P<=21)

enter image description here

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1