+ Reply to Thread
Results 1 to 3 of 3

Using AVERAGEIFS function to average a smaller subset of criteria data

  1. #1
    Registered User
    Join Date
    03-22-2012
    Location
    Warminster, Pennsylvania, USA
    MS-Off Ver
    Excel 2007
    Posts
    5

    Using AVERAGEIFS function to average a smaller subset of criteria data

    Hello all, I am pretty new to constructing more complex excel functions, so I will try my best to explain what my goals are.

    Please Login or Register  to view this content.
    This formula was used to to provide an average of all data that fell within +/- 2 standard deviations (used as a general outlier eliminator) that was not a 0. Now I would like to determine the average of a smaller subset (E622:E721) of the data, but still exclude any values (in the smaller subset) that are outside 2 standard deviations of the larger set. How would I manipulate this formula to make this possible (I've tried and keep getting #value errors)? The goal is to get this all done in one all-inclusive formula and my brain is fried from looking at data all day and as a result I'm having a hard time using common sense anymore . Any help would be greatly appreciated.

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Using AVERAGEIFS function to average a smaller subset of criteria data

    Just change the ranges rather than the criteria, i.e.

    =AVERAGEIFS(E622:E721,E622:E721,"<"&(AVERAGEIF(E2:E721,"<>0"))+(2*(STDEV(E2:E721))),E622:E721,">"&(AVERAGEIF(E2:E721, "<>0"))-(2*(STDEV(E2:E721))))

    Edit: A shorter "array formula" would also do the same job, i.e.

    =AVERAGE(IF(ABS(E622:E721-AVERAGEIF(E2:E721,"<>0"))<2*STDEV(E2:E721),E622:E721))

    confirmed with CTRL+SHIFT+ENTER
    Last edited by daddylonglegs; 03-22-2012 at 04:19 PM.
    Audere est facere

  3. #3
    Registered User
    Join Date
    03-22-2012
    Location
    Warminster, Pennsylvania, USA
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Using AVERAGEIFS function to average a smaller subset of criteria data

    I knew it was something easy. Before I had only changed the first criteria and completely forgot about the second. Silly for asking such a easy question. Thank you though!

+ 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