Quick, clean, and to the point

Filter by date

Excel formula: Filter by date
Generic formula 
=FILTER(rng1,MONTH(rng2)=7,"No data")

To filter data to include data based on dates, you can use the FILTER function with one of Excel's date functions. In the example shown, the formula in F5 is:

=FILTER(data,MONTH(date)=7,"No data")

where data (B5:E15) and date (C5:C15) are named ranges. The result returned by FILTER includes data in the month of July only.


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:

=FILTER(data,(MONTH(date)=7)*(YEAR(date)=2019),"No data")

Although the values for month and year are hardcoded above into the formula, they can easily be replaced with cell references.

Dynamic Array Formulas are available in Office 365 only.
Dave Bruns

Excel Formula Training

Formulas are the key to getting things done in Excel. In this accelerated training, you'll learn how to use formulas to manipulate text, work with dates and times, lookup values with VLOOKUP and INDEX & MATCH, count and sum with criteria, dynamically rank values, and create dynamic ranges. You'll also learn how to troubleshoot, trace errors, and fix problems. Instant access. See details here.

Download 100+ Important Excel Functions

Get over 100 Excel Functions you should know in one handy PDF.