Aug 09 2020 02:15 AM
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?
Aug 09 2020 02:29 AM
SolutionAn 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.
Aug 09 2020 04:39 AM
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.
Aug 17 2020 01:25 AM
Aug 09 2020 02:29 AM
SolutionAn 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.