+ Reply to Thread
Results 1 to 6 of 6

averageifs with a criteria that does not equal a cell value

Hybrid View

  1. #1
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,703

    Re: averageifs with a criteria that does not equal a cell value

    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

  2. #2
    Registered User
    Join Date
    08-13-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: averageifs with a criteria that does not equal a cell value

    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.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1