# COUNTIF formula using a date column - Count number of dates in current month

Options
✭✭✭

Hi,

I am trying to write a formula that allows me to count the number of dates that have the current month. Have tried a few formulas and the only one I can get to work is the following however; I dont get the expected number which should be 4:

=COUNTIFS([Inactive Date]1:[Inactive Date]2232, ISDATE(@cell), [Inactive Date]1:[Inactive Date]2232, MONTH(@cell) = MONTH(TODAY()))

This returns a total of 83 instead of 4:

Note: I did ensure that my Inactive Date column is set to the Date type

Tags:

• ✭✭✭✭✭✭
Options

Your current formula will match any date with the current month, but it does not take into account the year. Try this instead:

=COUNTIFS([Inactive Date]1:[Inactive Date]2232, ISDATE(@cell), [Inactive Date]1:[Inactive Date]2232, MONTH(@cell) = MONTH(TODAY()), [Inactive Date]1:[Inactive Date]2232, YEAR(@cell) = YEAR(TODAY())

• ✭✭✭✭✭✭
Options

Awesome, I'm glad it worked for you!

• ✭✭✭✭✭✭
Options

Your current formula will match any date with the current month, but it does not take into account the year. Try this instead:

=COUNTIFS([Inactive Date]1:[Inactive Date]2232, ISDATE(@cell), [Inactive Date]1:[Inactive Date]2232, MONTH(@cell) = MONTH(TODAY()), [Inactive Date]1:[Inactive Date]2232, YEAR(@cell) = YEAR(TODAY())

• ✭✭✭
Options

That worked like a charm! Thank you for the quick reply and solution Carson!