This formula relies on the FILTER function to retrieve data based on a logical test created with the MONTH function. The array argument is provided as the named range data, which contains the full set of data without headers. The include argument is constructed with the MONTH function:
Here, MONTH receives the range C5:C15. Since the range contains 11 cells, MONTH returns an array with 11 results:
Each result is then compared to 7, and this operation creates an array of TRUE and FALSE values, which is delivered to the FILTER function as the include argument.
Only rows where the result is TRUE make it into the final output. The if_empty argument is set to "No data" in case no matching data is found.
Filter by month and year
To filter by month and year, you can construct a formula using boolean logic like this:
Although the values for month and year are hardcoded above into the formula, they can easily be replaced with cell references.