Count the amount of times a month appears in a range

halloyd

New Member
Joined
Sep 14, 2018
Messages
17
I tried the formulas here, but they are all returning #VALUE .

https://www.mrexcel.com/forum/excel...umber-times-specific-month-appears-range.html

Please note that I am referencing a separate workbook ('[2018 Claim Status Sheet.xlsx]Active Claims') which has the dates in it.

This is an example of my info plugged into one of the formulas:
Code:
=SUMPRODUCT(--(MONTH('[2018 Claim Status Sheet.xlsx]Active Claims'!$F1:$F500)=9),'[2018 Claim Status Sheet.xlsx]Active Claims'!$F1:$F500<>"")

Thanks!
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Try:

Code:
=SUMPRODUCT(--(MONTH('[2018 Claim Status Sheet.xlsx]Active Claims'!$F1:$F500)=9),[COLOR=#ff0000]--([/COLOR]'[2018 Claim Status Sheet.xlsx]Active Claims'!$F1:$F500<>""[COLOR=#ff0000])[/COLOR])
or just
Code:
=SUMPRODUCT(--(MONTH('[2018 Claim Status Sheet.xlsx]Active Claims'!$F1:$F500)=9))
 
Upvote 0
Try:

Code:
=SUMPRODUCT(--(MONTH('[2018 Claim Status Sheet.xlsx]Active Claims'!$F1:$F500)=9),[COLOR=#ff0000]--([/COLOR]'[2018 Claim Status Sheet.xlsx]Active Claims'!$F1:$F500<>""[COLOR=#ff0000])[/COLOR])
or just
Code:
=SUMPRODUCT(--(MONTH('[2018 Claim Status Sheet.xlsx]Active Claims'!$F1:$F500)=9))
thanks for the reply!

Unfortunately another Value error using both ):
 
Upvote 0
Make sure that your cells
Active Claims'!$F1:$F500)are actual Excel dates (numeric) and not text.
 
Upvote 0
Make sure that your cells
Active Claims'!$F1:$F500)are actual Excel dates (numeric) and not text.
Oh... Wow, I feel like the reason IT people talk to their customers like they're stupid.

Thank you! That fixed it!

So here's the thing: this list is going to keep expanding. Is there a way for it to work on blank cells, ignoring them but detecting any added dates in the future?
 
Upvote 0
Unless I'm missing something, blanks shouldn't be a problem. See example below with blank between dates and after the dates.
Another option would be to turn your data into a table and the formula range will expand as you add data.

Links to making data into a table.
https://www.contextures.com/xlExcelTable01.html
https://support.office.com/en-us/ar...l-tables-7ab0bb7d-3a9e-4b56-a3c9-6c94334e492c
Excel Workbook
ABC
1DateCount of 9th month
22/5/20183
34/2/2018
4
59/2/2018
66/5/2008
79/12/2018
89/10/2018
910/12/2018
Sheet
 
Upvote 0
If the year is not important...

Control+shift+enter, not just enter:

=SUM(IF(ISNUMBER('[2018 Claim Status Sheet.xlsx]Active Claims'!$F1:$F500),IF(MONTH('[2018 Claim Status Sheet.xlsx]Active Claims'!$F1:$F500),1)))

If you want to fix the count to a certain year, say to 2018, control+shift+enter, not just enter:

=SUM(IF(ISNUMBER('[2018 Claim Status Sheet.xlsx]Active Claims'!$F1:$F500),IF('[2018 Claim Status Sheet.xlsx]Active Claims'!$F1:$F500-DAY('[2018 Claim Status Sheet.xlsx]Active Claims'!$F1:$F500)+1=DATE(2018,9,1),1)))
 
Upvote 0
Thank you!

New question:
This formula is counting blanks as January (1), so it says I currently have a lot of claims from January open when I actually have none.
Code:
=SUMPRODUCT(--(MONTH('[2018 Claim Status Sheet.xlsx]Active Claims'!$G3:$G500)=1))
Any idea how to fix?
 
Upvote 0

Forum statistics

Threads
1,223,896
Messages
6,175,260
Members
452,627
Latest member
KitkatToby

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top