J
Jim
Hi,
I've had a lot os success using SUMPRODUCT for various tasks.
However, I have run into a problem that I cannot seem to resolve.
I have a dataset that is sampled about 277 times a day for a year
(12021) records. I want to reduce this to a set of daily averages.
Column format
A mm/dd/yy hh:mm (date/timestamp with ~5 min. samples)
B 50.0
....
L mm/dd/yy hh:mm (date/timestamp with 24hr averages)
Now I want to get an average value for B over a single day.
The following works, but only for the first 25 days or so
(25*277 > 5301)...
=SUMPRODUCT(($A$2:$A5301>=L3)*($A$2:$A5301<L4)*($B$2:$B5301>-900)*($B$2:$B5301))/SUMPRODUCT(($A$2:$A5301>=L3)*($A$2:$A5301<L4))
When I use the any range larger than about A$2:A$5301 a #NUM! error is
returned in the cell.
=SUMPRODUCT(($A$2:$A6501>=L3)*($A$2:$A6501<L4)*($B$2:$B6501>-900)*($B$2:$B6501))/SUMPRODUCT(($A$2:$A6501>=L3)*($A$2:$A6501<L4))
=SUMPRODUCT(($A$2:$A12021>=L3)*($A$2:$A12021<L4)*($B$2:$B12021>-900)*($B$2:$B12021))/SUMPRODUCT(($A$2:$A12021>=L3)*($A$2:$A12021<L4))
Is there a better way to obtain the average value for column B when
column A (Date) is within a specific range?
Thanks
I've had a lot os success using SUMPRODUCT for various tasks.
However, I have run into a problem that I cannot seem to resolve.
I have a dataset that is sampled about 277 times a day for a year
(12021) records. I want to reduce this to a set of daily averages.
Column format
A mm/dd/yy hh:mm (date/timestamp with ~5 min. samples)
B 50.0
....
L mm/dd/yy hh:mm (date/timestamp with 24hr averages)
Now I want to get an average value for B over a single day.
The following works, but only for the first 25 days or so
(25*277 > 5301)...
=SUMPRODUCT(($A$2:$A5301>=L3)*($A$2:$A5301<L4)*($B$2:$B5301>-900)*($B$2:$B5301))/SUMPRODUCT(($A$2:$A5301>=L3)*($A$2:$A5301<L4))
When I use the any range larger than about A$2:A$5301 a #NUM! error is
returned in the cell.
=SUMPRODUCT(($A$2:$A6501>=L3)*($A$2:$A6501<L4)*($B$2:$B6501>-900)*($B$2:$B6501))/SUMPRODUCT(($A$2:$A6501>=L3)*($A$2:$A6501<L4))
=SUMPRODUCT(($A$2:$A12021>=L3)*($A$2:$A12021<L4)*($B$2:$B12021>-900)*($B$2:$B12021))/SUMPRODUCT(($A$2:$A12021>=L3)*($A$2:$A12021<L4))
Is there a better way to obtain the average value for column B when
column A (Date) is within a specific range?
Thanks