but if the G:G value needs to be between R2 and R2+4 perhaps you want
=AVERAGEIFS(E:E,G:G,">="&R2,G:G,"<="&R2+4)
but if the G:G value needs to be between R2 and R2+4 perhaps you want
=AVERAGEIFS(E:E,G:G,">="&R2,G:G,"<="&R2+4)
Last edited by daddylonglegs; 08-13-2012 at 04:37 PM.
Audere est facere
Thanks so much for helping guys! but by looking at the output I can see the results aren’t coming out right, so maybe I haven’t explained myself properly. Just to elaborate on what I’m doing and why:
Each row relates to an item being brought onto market. Column E has data on realised sales prices; Column G has date of exit from the market (quarter of sale); column R has date of initial listing/entry to the market. In my model, every seller should enter a market and see the average prices of items sold 4 time periods earlier. I’m asking this question about ‘does not equal’ because I do not want this average to include cases where the seller entering the market previously sold their item 4 periods before (that being included somewhere else so it would be double counting to include it in this average too). So at this point I tried the formula
=AVERAGEIFS(E:E,G:G, R2,G2, "<>"&R2+4 )
to say that if any individual unit’s date of entry exceeded the previous date of sale for that same unit by 4 quarters, do not include that previous sale price in the average of all sales prices at time t-4 (ie. if G2 is exactly 4 bigger than R2, drop it from the average). By changing the formula to
=AVERAGEIFS(E:E,G:G, R2,G:G, "<>"&R2+4 )
Am I not asking something different to the above question? Also, I noticed that the output of the new formula didn’t have any differences to the results when I ignore the double counting issue, which I know is present when I look at the data.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks