Spreadsheets often have dates as part of their data. This tutorial will help you determine how many of these dates are between two days. Grab a copy of the live spreadsheet to follow along.
See the same examples explained in a video.
Example 1 – Between Two Dates
Let’s see how many days in the list below are between February 17, 2022, and February 28, 2022.
We are going to cover three different methods of counting these days. All of them will use the COUNTIFS function, which can take multiple conditions – one for the start date and one for the end date.
Dates Typed Directly into the Function
The quickest way to finish this formula is to type the dates directly into the function as follows.
Using dates in formulas can be tricky, so this technique may not work for you. Notice the placement of the
"s in the formula. They need to surround the
> and the date value.
Using a Cell Reference for the Date
As shown in the video, you can also use dates from other cells. If you had
2/17/2022 in cell
2/28/2022 in cell
C2, you would write the formula as follows.
Notice that quotes do not enclose the cell references. The quotes are only around the operators. In addition, we use an ampersand (&) to join the operators to the cell references. The advantage of using cell references is that you can see the dates without showing the formula, and they are easier to change.
Using the DATE Function
The DATE function is the last and most reliable method of entering the dates.
Regardless of where you live, the DATE function always wants the inputs in YEAR, MONTH, DAY order.
Example 2 – Between and Including Two Dates
Lastly, if you want to count the days, including the start and end date, you must add the
= operator to your formula.
Live Examples in Sheets
Go to this spreadsheet for the examples above that you can study and use anywhere you like.
Count Rows With OR Condition in Two Columns- Google Sheets
Count cells based on values in two columns
Count Cells Between Two Dates – Google Sheets
Count the number of cells with dates that fall between two specified days.