hi,
how can i use countif or sumproduct or sumif ..etc to calculate how many occurrence in a specify date and time .
Pls see example.
hi,
how can i use countif or sumproduct or sumif ..etc to calculate how many occurrence in a specify date and time .
Pls see example.
Last edited by okl; 09-24-2009 at 03:35 AM.
Are you looking to return the results as per your sample - ie a 1 in the appropriate column on each row ? Or are you looking to do a cumulative count in one cell for each time frame ?
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
Hi Donkey,
Cumulative count in one cell for each time frame..
Thanks
Given your bands aren't even (03:00 -> 15:00, 15:01 -> 03:00, 03:01 -> 15:00 etc...) a common formula is obviously little convoluted so keeping things simple(ish):
If we assume
then![]()
Please Login or Register to view this content.
then![]()
Please Login or Register to view this content.
First of course you must ensure the values in B are date time values... when I opened your file they were numbers stored as text rather than being true numbers, to convert run Text to Columns on Column B (click Finish).![]()
Please Login or Register to view this content.
Hi Donkey,
How about just a 1 in each column/row, as per my sample.
Seem easier..
Thanks
It's not really any easier - you still need to coerce values in B to be numeric and specify start / end times for each column to ascertain band
(and I would not to say the prior approach is overly complex)
Thanks got it work!
OK that's good but I don't understand the need for the formulae in row 3 onwards.
Yes, just need to apply the formula in row 2, row 3 onwards are unnecessary ..![]()
Hi,
If i add in a new column Quality, how can i count no of items occurred in that date/time range.
Pls see sample.
Change the COUNTIFs to SUMIFs, eg:
D4: =SUMIF($B:$B,">="&D$2,$C:$C)-SUMIF($B:$B,">="&E$2,$C:$C)
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks