How to count dates that are within a specific month while ignoring blank cells?

Int3rn

New Member
Joined
Apr 1, 2021
Messages
2
Office Version
  1. 365
Platform
  1. Windows
I am using the method described here: How to Countif by date/month/year and date range in Excel?, but I am open to changing the formula altogether if needed.

My specific formula is =SUMPRODUCT(1*(MONTH(Submissions!W:W)=1)) for January, =SUMPRODUCT(1*(MONTH(Submissions!W:W)=2)) for February, and so on.

These formulas work only if the range is W2:W10 or whatever range doesn't contain blank cells. How do I get the formula with W:W to ignore the blank cells and not return a #VALUE! error or count blank cells as January?

Thanks for your help!
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Hi & welcome to MrExcel.
How about
Excel Formula:
=SUMPRODUCT((MONTH(Submissions!W:W)=1)*(Submissions!W:W<>""))
BUT you should never use use entire columns in array functions. It can bring your workbook to a grinding halt.
 
Upvote 0
Hi & welcome to MrExcel.
How about
Excel Formula:
=SUMPRODUCT((MONTH(Submissions!W:W)=1)*(Submissions!W:W<>""))
BUT you should never use use entire columns in array functions. It can bring your workbook to a grinding halt.
Thank you! This worked perfectly. I had no idea about using whole columns in array functions, thanks for the tip! I won't ever need to go past 200 entries, so I made the range W2:W201 and it works great.
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,790
Messages
6,121,607
Members
449,037
Latest member
Arbind kumar

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