Counting months ignoring blanks and text

RicardoCubed

Board Regular
Joined
Jul 10, 2013
Messages
206
Office Version
  1. 365
Platform
  1. Windows
Hi. I have a file with a column of dates that is interrupted with both blanks and text. I want to ignore both the blanks and text and calculate how many records match each month of the year. I have the formula to ignore blanks but am stuck on ignoring text. Help please

[TABLE="width: 113"]
<tbody>[TR]
[TD]=SUMPRODUCT(--(Detail!$CC$3:$CC$243<>""),--(MONTH(Detail!$CC$3:$CC$243)=A75))[/TD]
[/TR]
</tbody><colgroup><col></colgroup>[/TABLE]
[TABLE="width: 113"]
<tbody>[TR]
[TD][/TD]
[/TR]
</tbody><colgroup><col></colgroup>[/TABLE]
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
See if this works.
This is an array formula and must be entered with CTRL-SHIFT-ENTER.

=SUMPRODUCT(--(MONTH(IF(ISNUMBER(Detail!$CC$3:$CC$243),Detail!$CC$3:$CC$243))=A75))

Example below.
Excel Workbook
ABCD
1DateMonth to count5
25/1/20142
36/1/2014
46/5/2014
5
6
75/20/2014
87/12/2014
9Text1
10Text2
1112/1/1915
1210/1/1919
Sheet
 
Upvote 0
Thank you for your response but this suggestion doesnt work. It is still counting a blank cell as a 1. If you put a 1 in month to count the result is 4.
There must be a formula that allows you to ignore blanks and text in a column when performing sumif's, etc.
Any help appreciated!!!!!
 
Upvote 0
Thank you for your response but this suggestion doesnt work. It is still counting a blank cell as a 1. If you put a 1 in month to count the result is 4.
There must be a formula that allows you to ignore blanks and text in a column when performing sumif's, etc.
Any help appreciated!!!!!

Control+shift+enter, not just enter:

=SUM(IF(ISNUMBER(DateRange),IF(YEAR(DateRange)=2014,IF(MONTH(DateRange)=3,1))))

This would count all dates which fall in month 3 of 2014...
 
Upvote 0
Well I can see why you have the MrExcel MVP designation!!! Thank you so much!!!! Such an elegant solution! I just modified the year to be any value great than to pull in all the birth years. Really appreciate it!!!!
 
Upvote 0
I am having the same issue. Date column contains dates, blanks, and "x"'s. The formula work for every month except for January. When criteria is met in column M, and column T is January, "blank", or "x" it counts as 1. When formula is set to =2 thru 12 (feb - dec), everything works great. When Month is set to =1, blanks and text are counted. here is my array formula. I am using ctrl+shift+enter for array.

{=SUMPRODUCT((F09P1!$M$116:$M$400="HYDK")*(--(MONTH(IF(ISNUMBER(F09P1!$T$116:$T$400),F09P1!$T$116:$T$400))=1)))}

Please help.

Kirk
 
Upvote 0
I am having the same issue. Date column contains dates, blanks, and "x"'s. The formula work for every month except for January. When criteria is met in column M, and column T is January, "blank", or "x" it counts as 1. When formula is set to =2 thru 12 (feb - dec), everything works great. When Month is set to =1, blanks and text are counted. here is my array formula. I am using ctrl+shift+enter for array.

{=SUMPRODUCT((F09P1!$M$116:$M$400="HYDK")*(--(MONTH(IF(ISNUMBER(F09P1!$T$116:$T$400),F09P1!$T$116:$T$400))=1)))}

Please help.

Kirk

Control+shift+enter, not just enter:
Rich (BB code):
=SUM(IF(F09P1!$M$116:$M$400="HYDK",
  IF(ISNUMBER(F09P1!$T$116:$T$400),
  IF(MONTH(F09P1!$T$116:$T$400)=1,1))))

The foregoing would pick out the January month of any year. If this is not intended, we need to add a year test to the formula:
Rich (BB code):
=SUM(IF(F09P1!$M$116:$M$400="HYDK",
  IF(ISNUMBER(F09P1!$T$116:$T$400),
  IF(YEAR(F09P1!$T$116:$T$400)=2014,
  IF(MONTH(F09P1!$T$116:$T$400)=1,1)))))
 
Upvote 0

Forum statistics

Threads
1,222,631
Messages
6,167,194
Members
452,104
Latest member
jadethejade

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