OaklandJim
Well-known Member
- Joined
- Nov 29, 2018
- Messages
- 833
- Office Version
- 365
- Platform
- Windows
Still trying to use multiple criteria in SumIfs and CountIfs on a series of 8760 hourly data including time-of-day (SeriesTimes) and values to sum (SeriesScaledValues). Have made some good progress...But
I put together a workbook (link below), no code, with all offending calculations. Hopefully notes give good enuf orientation to SumIfs and CountIfs (and Sumproduct) experts.
I'll try to explain briefly.
I Have several adjacent 8760 data series (columns) including "scaled values" (to be summed), dates, times, season indicator (integer) and IsWeekend? (boolean) indicator flags. Separately are time periods specified.
I need to home in on data for a given range of dates, within a given "season" and within a given time range, separately, for weekdays and weekends.
I can get correct counts and sums results three different ways with 1) monthly, 2) whether weekday or weekend, and 3) seasonal by weekday and weekend.
But when I try to add the start and end times -- as criteria -- I get answers that are apparently erroneous. BUT, they are only off by about 4 1/2 to 5%. So close.
I suspect that it is the possible illogic I'm using to specify the times for items to select rather than anything Sumproduct or SumIfs related?
Logic: pick first hour THROUGH but not including the final hour of a time period specified with start and end time. That because these are hourly values that prevail "through the entire hour". So for 5PM to 10PM picked are five values, the ones for 5PM, 6PM, 7PM, 8PM, 9PM.
Any takers? I'd be moocho appreciative if i get a solution.
I put together a workbook (link below), no code, with all offending calculations. Hopefully notes give good enuf orientation to SumIfs and CountIfs (and Sumproduct) experts.
I'll try to explain briefly.
I Have several adjacent 8760 data series (columns) including "scaled values" (to be summed), dates, times, season indicator (integer) and IsWeekend? (boolean) indicator flags. Separately are time periods specified.
I need to home in on data for a given range of dates, within a given "season" and within a given time range, separately, for weekdays and weekends.
I can get correct counts and sums results three different ways with 1) monthly, 2) whether weekday or weekend, and 3) seasonal by weekday and weekend.
But when I try to add the start and end times -- as criteria -- I get answers that are apparently erroneous. BUT, they are only off by about 4 1/2 to 5%. So close.
I suspect that it is the possible illogic I'm using to specify the times for items to select rather than anything Sumproduct or SumIfs related?
Logic: pick first hour THROUGH but not including the final hour of a time period specified with start and end time. That because these are hourly values that prevail "through the entire hour". So for 5PM to 10PM picked are five values, the ones for 5PM, 6PM, 7PM, 8PM, 9PM.
Any takers? I'd be moocho appreciative if i get a solution.