Count Values in A Range of Dates

billandrew

Well-known Member
Joined
Mar 9, 2014
Messages
743
Good morning All

Actually viewed this subject in a recent Post. Attempting to understand why the Int Function returns a value error from a cell. I believe it has something to do with the dates not in English format.

The cells with the error are from 16/01/2017 11:30 and down.
Thanks

<tbody>
</tbody>

Example

OrderDateItem
3168-52522/1/2017 9:30448
3168-52522/1/2017 9:30448
3321-54642/1/2017 10:30441
3412-56112/1/2017 10:30508
3412-56122/1/2017 10:30508
3412-56122/1/2017 10:30508
3412-56122/1/2017 10:30508
3396-55852/1/2017 11:00631
3396-55862/1/2017 11:00631
3396-55862/1/2017 11:00631
3519-577716/01/2017 11:30239
3339-549816/01/2017 12:00157
3541-581116/01/2017 12:30508
3541-581216/01/2017 12:30508
3541-581216/01/2017 12:30508
3541-581216/01/2017 12:30508
3541-581216/01/2017 12:30508
3541-581216/01/2017 12:30508
3495-574416/01/2017 14:10448
3547-581916/01/2017 14:30731
3548-582016/01/2017 14:30732
3555-582917/02/2017 09:30545
3567-584717/02/2017 10:30255
3567-584817/02/2017 10:30255
3567-584817/02/2017 10:30508
3567-584817/01/2017 10:30509
3567-584817/02/2017 10:30255
3458-568317/02/2017 13:00523

<colgroup><col><col><col></colgroup><tbody>
</tbody>
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
What is the question? You need of course to have date/time range in a way that is compatible with your system.
 
Upvote 0
attempting to sum the number of items from 1/1/2017 to 1/31/2017.

I am using the formula SUM(IF(FREQUENCY(IF(INT(B$2:B$29)>=F1,IF(INT(B$2:B$29)<=EOMONTH(F1,0),MATCH(C$2:C$29,C$2:C$29,0))),ROW(C$2:C$29)-ROW(C$2)+1),1)) cell F1 = the date 1/1/2017.

I am incurring a value error from dates starting at cell B12 ( 16/01/2017 ).
 
Upvote 0
attempting to sum the number of items from 1/1/2017 to 1/31/2017.

I am using the formula SUM(IF(FREQUENCY(IF(INT(B$2:B$29)>=F1,IF(INT(B$2:B$29)<=EOMONTH(F1,0),MATCH(C$2:C$29,C$2:C$29,0))),ROW(C$2:C$29)-ROW(C$2)+1),1)) cell F1 = the date 1/1/2017.

I am incurring a value error from dates starting at cell B12 ( 16/01/2017 ).

Because we have to do with numbers...

Control+shift+enter, not just enter:

Either...

=SUM(IF(FREQUENCY(IF(INT(B2:B29)-DAY(INT(B2:B29))+1=F1,D2:D29),D2:D29),D2:D29))

Or...

=SUM(IF(FREQUENCY(IF(INT(B2:B29)>=F1,IF(B2:B29<=EOMONTH(F1,0),D2:D29)),D2:D29),D2:D29))
 
Upvote 0
By the way, if you are intending to count, not to sum...

=SUM(IF(FREQUENCY(IF(INT(B2:B29)-DAY(INT(B2:B29))+1=F1,D2:D29),D2:D29),1))

=SUM(IF(FREQUENCY(IF(INT(B2:B29)>=F1,IF(B2:B29<=EOMONTH(F1,0),D2:D29)),D2:D29),1))
 
Upvote 0
My error, I am attempting to sum the number of dates which fall between 1/1/2017 & 1/31/2017. The issue is the dates are in the incorrect format.

Example 2/1/2017 9:30 is actually January 1, 2017 etc....
 
Upvote 0
My error, I am attempting to sum the number of dates which fall between 1/1/2017 & 1/31/2017. The issue is the dates are in the incorrect format.

Example 2/1/2017 9:30 is actually January 1, 2017 etc....

The format is DMY + time. You need to convert it to MDY + time if you are on an American system. This must be done for each date/time entry.
 
Upvote 0

Forum statistics

Threads
1,214,788
Messages
6,121,597
Members
449,038
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