# Total months Formula

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.... Thank you!

6 Replies

# Re: Total months Formula

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. # Re: Total months Formula

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?

# Re: Total months Formula

@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 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.

# Re: Total months Formula

=COUNTIFS(A2:A10,">="&DATE(year,month,1),A2:A10,"<="&DATE(year,month+1,1)-1)

# Re: Total months Formula

besides changing the cell range was anything else supposed to be changed in this formula? all I get are 0 for the totals

# Re: Total months Formula

=COUNTIFS(A2:A10,">="&DATE(2023,1,1),A2:A10,"<="&DATE(2023,1+1,1)-1)

data
A
date
2023-01-15