Sumproduct counting blanks

cktoo

New Member
Joined
Jul 18, 2016
Messages
6
Office Version
  1. 2021
Platform
  1. Windows
I'm trying to make a sumproduct formula to count the number of entries in a specific month in the E row of the "DATA" sheet, the formula is located in F7 of the "Res" Sheet, the month to be searched would be typed in G2 of the "Res" Sheet.
My problem is that when I try to type 1 in G2 it counts all the blank cells as well.
This is the formula I'm using
=SUMPRODUCT(1*(MONTH(DATA!E5:E50)=G2))
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
What version of Excel are you using?
I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

How about
Excel Formula:
=SUMPRODUCT((MONTH(DATA!E5:E50)=G2)*(DATA!E5:E50<>""))
 
Upvote 0
Solution
Hi, I updated my info, thank you for the tip.
The formula above worked, I may have misstyped it in my early tries, it always ended with te error "spill"
Thank you very much.
 
Upvote 0
Glad to help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,649
Messages
6,120,733
Members
448,987
Latest member
marion_davis

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