Use COUNTIF to count items after a certain date

November 28, 2018

Excel

The COUNTIF function can be used in many different ways. One such way is to count the number of items bought after a specified date.

What To Do

  1. Copy the following table values directly into a new Excel Spreadsheet.
Item Cost
Nails 1/1/2018
Screws 7/8/2018
Glass 29/5/2017
Plastic Sheets 1/1/2015
Wood 10/10/2018
Steel Sheets 5/2/2018
Wood Glue 9/7/2016

Note

Please note the date format is correct for my locale. You can always use the ISO date format to ensure correctness in every locale. I will show you later in this article.

I started my table from cell B2 instead of A1 to make it easier to see.

  1. In cell B11, I wrote the text: “Items bought after 1/7/2016”

  2. Add the following formula

Note

We are using the static (unchanging) value “1/7/2016”. We can also use a cell reference in the COUNTIF function, which I will show you later.

Formula

=COUNTIF(C3:C9,">1/7/2016")

Using the COUNTIF function with a static date

  1. Alternative: Use a Cell Reference

In this alternate step, we are using a cell reference. We are using the value stored in cell E3 to determine the value we are using in our COUNTIF function.

Note

Please take note at the formula below and take note of the ”&” sign *before the E3 cell reference*

Formula

=COUNTIF(C3:C9,">"&E3)

Using the COUNTIF function with a cell reference

Using the ISO Date Formula

ISO Date description

Formula

=COUNTIF(C3:C9,">2016-07-01")

Using the ISO Date in the COUNTIF function





Microsoft Office 365
Microsoft Office 365