SOLVED

New Contributor

# countif

Hi! I would like to count the cells of a coloumn if the date in the cell is within a specific month.

for istance, I may have 5 cells with a date within January 2020, 7 cells February 2020, 15 cells April 2020 and so on.

I tried with criteria like "jan" but it doesn't work: could someone help?

3 Replies
Best Response confirmed by Massimo_Cotichella (New Contributor)
Solution

# Re: countif

An easy way to do this is by creating a pivot table based on your data.

Add the date field (column) to both the Rows area and the Values area.

Excel will automatically group the dates by months.

If you prefer to use formulas, I'd add a helper column with formulas of the form

=MONTH(...)

This will return 1 for January, 2 for February etc.

You can then use =COUNTIF(helper_column, 1) to count the number of dates in January, etc.

# Betreff: countif

Attached is a sheet with an example

=ZÄHLENWENN(F:F;">=" &B1)-ZÄHLENWENN(F:F;">" &C1)

Translated into English

=COUNTIF(F:F,">=" &B1)-COUNTIF(F:F,">" &C1)

Nikolino

I know I don't know anything (Socrates)

* Kindly Mark and Vote this reply if it helps please, as it will be beneficial to more Community members reading here.

* Beware of scammers posting fake support numbers here.

# Re: countif

thank you Hans! I solved my problem by your suggestion!

Massimo