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

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
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,213,510
Messages
6,114,040
Members
448,543
Latest member
MartinLarkin

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