Total months Formula

Brass Contributor

Hello! 

Is there a formula I could use for each cell listed by month (see photo) that I could use that would total the amount of times each month was referenced in a range of dates.

Ex. lets say Colum A has 30 dates in mm/dd/yyyy format, and I would want to know the number of times January month was referenced, February was referenced, etc....

jaolvera_0-1689702789904.png

Thank you!

6 Replies

@jaolvera 

 

Rather than a formula, let Excel do the work by employing the Pivot Table. Here's an image, but I've attached the file as well.

mathetes_0-1689703612087.png

 

thank you! I am creating a dashboard that will reference another sheet that contains data and I want the dashboard to update as data is inputted, will this pivot table auto update as data gets imputed?

@jaolvera

 

It doesn't do it passively. However, so long as it's drawing from the same Table of data, all you need to do is click on the Refresh All button on the Data tool bar

mathetes_0-1689713731955.png

If you haven't already done so, I recommend clicking on the link embedded in the words  "Pivot Table" in my first reply to you. That will take you to a valuable resource explaining more about Pivot tables, which over recent decades have been one of the most widely used of Excel tools.

=COUNTIFS(A2:A10,">="&DATE(year,month,1),A2:A10,"<="&DATE(year,month+1,1)-1)
besides changing the cell range was anything else supposed to be changed in this formula? all I get are 0 for the totals
=COUNTIFS(A2:A10,">="&DATE(2023,1,1),A2:A10,"<="&DATE(2023,1+1,1)-1)

data
A
date
2023-01-15