Why is greater the 1st of month not working?

tra1a

Board Regular
Joined
Jul 31, 2011
Messages
85
formula:
=COUNTIF(WIA!D:D,"<="&DATE(2011,9,31))-COUNTIF(WIA!D:D,"<="&DATE(2011,9,1))

It is not working for 9/1/2011. Why?

Thanks.
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Because you subtracted the ones that are less than OR Equal to 9/1/2011

Try changing

=COUNTIF(WIA!D:D,"<="&DATE(2011,9,31))-COUNTIF(WIA!D:D,"<="&DATE(2011,9,1))
to
=COUNTIF(WIA!D:D,"<="&DATE(2011,9,31))-COUNTIF(WIA!D:D,"<"&DATE(2011,9,1))
 
Upvote 0
Another way:

=SUMPRODUCT(--(TEXT(WIA!D1:D5000,"mmyyyy")="092011"))

Note you can't use whole columns with SUMPRODUCT in versions of Excel prior to XL2007.
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,730
Members
452,939
Latest member
WCrawford

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