In my spread I thought I'd found a way to sumif a moving range. However, as a check I tried one set of data with different criteria and the #'s were off. The formula I'm using:
=SUMIF(H$4:H$55539,OFFSET('MassHub Fwds'!C$4,MATCH($K4,'MassHub Fwds'!C$5:C$70,0),1),OFFSET(G$3,MATCH(K4,A$4:A$55539,0),0):OFFSET(G$3,MATCH(DATE(YEAR(K4),MONTH(K4)+1,DAY(K4)),A$4:A$55539,0)-1,0))
The criterion for the SumIf (first offset) are basically prices on another sheet which seems to work fine, I've tested this without the sumif and does what it's told. However, when I try to define the [sum range] with offsets, the #'s are thrown off.
What the 'match' in the sum range offsets are looking at are dates. To paint the picture:
Date; Hour; SumRange; Range; Criteria; Output
9/1/06; 1; 111.50; 61.65; 9/1/06; ...
9/1/06; 2; 90.65; 60.22;
9/1/06; 3; 101; 61.65;
.
.
.
10/1/06; 1; 60.35; 61.65
Basically what's happening is the 'Range' is full of values from another spread (this is what the first offset looks up). The sum range offsets look up the date (the 'Criteria' for my output) for which to sum. One underlying problem I feel is that the 'Range' has multiple values which are the same that occur on different dates; so a SumIf without a 'begin date' and 'end date' will sum up values which are not within the criteria.
Any ideas?
Bookmarks