+ Reply to Thread
Results 1 to 5 of 5

STDEV from AVERAGEIFS using date ranges

  1. #1
    Registered User
    Join Date
    05-30-2012
    Location
    Ohio, USA
    MS-Off Ver
    Excel 2007
    Posts
    2

    STDEV from AVERAGEIFS using date ranges

    I am trying to find a way to calculate the Standard Deviation similar to the AVERAGEIFS function. I did do a search but couldn't find a post with this exact issue.

    I have used the AVERAGEIFS function to calculate the mean within a specific three month date range. For example:
    Please Login or Register  to view this content.
    The dates are in column A and the actual values in column D.

    I have about 5 years worth of data so the AVERAGEIFS function is brilliant for calculating the mean in a specific date range, but I haven't been able to get the StDev of the mean.

    Thanks for any suggestions.

  2. #2
    Forum Contributor
    Join Date
    01-28-2010
    Location
    Riverside, CA
    MS-Off Ver
    Excel 2010
    Posts
    132

    Re: STDEV from AVERAGEIFS using date ranges

    Here's a tip, this is an array, after you enter the formula, do not just hit enter, you need to hold CTRL + SHIFT + ENTER, which will put {} around it:

    =STDEV(IF(AND(Range<=condition 1,Range>=condition 2),range of stdev))

    If you have a sample worksheet, I may be able to help more.
    Happy Excel'ing!

  3. #3
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: STDEV from AVERAGEIFS using date ranges

    You could use a Pivot Table rather than an array formula.

    Drag the applicable field to the Values quadrant of the PT dialog and change the default option from SUM to STDEV or STDEVP.
    You can drag the same field to the Values quadrant more than once and set it up to show average, min, manx, etc.

    Plus, by putting the date into the report filter you can select the date range for the data.
    Or, put the date field in the Row Labels section of the dialog and group on specific date intervals using the grouping option of the PT.
    Palmetto

    Do you know . . . ?

    You can leave feedback and add to the reputation of all who contributed a helpful response to your solution by clicking the star icon located at the left in one of their post in this thread.

  4. #4
    Registered User
    Join Date
    05-30-2012
    Location
    Ohio, USA
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: STDEV from AVERAGEIFS using date ranges

    I tried your formula and suggestion to use array. Ctl + Shift + Enter. But it returns Div/0! error...

    example.xlsx

    I tried attaching an example. Thanks for your help!

  5. #5
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: STDEV from AVERAGEIFS using date ranges

    I would use a couple of cells to contain dates to make the formula more flexible so that you can alter the date criteria w/out editing the formula

    =STDEV(IF(A3:A266>=J1,IF(A3:A266<=K1,D3:D266)))

    Where J1 contain the earliest date (12/1/2006 per your example)
    and K1 contains end date (2/2/8/2007)

+ 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