I'm at a loss. I've searched high and low for a solution.
I'm try to find out which units were active during the intervals set in d (d2:d3, d3:d4, etc) and then average out the size of those units in e.HTML Code:
I can identify which ones are active with a variation of the following:
=if(or(and(C1:c6>=D1, D2< B1:B6), "overlap", "no overlap")
But I don't know how to use this to find the average of the units that match the criteria. I was something of something like this:
=if(or(and(b1:b6>=d2, b1:b6<=d2),and(d1>=b1:b6,d1<=c1:c6),average(a1:a6),0)
I know this is wrong. Any help would be appreciated. I have other conditions (5-6, but none with "and" or "or") to meet asides from this time range overlap criteria, but I think I can figure out how to implement these once I get pass this hurdle. Anything helps at this point.
Bookmarks