+ Reply to Thread
Results 1 to 12 of 12

Std deviation for multiple ifs

  1. #1
    Registered User
    Join Date
    07-10-2012
    Location
    NSW, Australia
    MS-Off Ver
    Excel 2010
    Posts
    76

    Std deviation for multiple ifs

    I have to following average if formula that calculates the average sales for a person (each name is in col C) for all the dates prior to and including the date in col G.

    AVERAGEIFS([Sales],[Name],C2,[Date],"<="&G2)

    I would like to re-create the exact same formula, but for standard deviation, such that the formula calculates the std deviation of sales for a person (each name is in col C) for all the dates prior to and including the date in col G.

    I assume an array formula is required, although I'm not sure exactly of the set up.

    Thanks in advance

  2. #2
    Forum Expert Crooza's Avatar
    Join Date
    10-19-2013
    Location
    Hunter Valley, Australia
    MS-Off Ver
    Excel 2003 /7/10
    Posts
    2,082

    Re: Std deviation for multiple ifs

    Can you upload your spreadsheet?
    Happy with my advice? Click on the * reputation button below

  3. #3
    Registered User
    Join Date
    07-10-2012
    Location
    NSW, Australia
    MS-Off Ver
    Excel 2010
    Posts
    76

    Re: Std deviation for multiple ifs

    Please find attached the example spreadsheet
    Attached Files Attached Files

  4. #4
    Forum Expert Crooza's Avatar
    Join Date
    10-19-2013
    Location
    Hunter Valley, Australia
    MS-Off Ver
    Excel 2003 /7/10
    Posts
    2,082

    Re: Std deviation for multiple ifs

    Try this in column D and drag down

    =STDEV.P(IF($A$2:A2=A2,$C$2:C2,""))

    it should enter automatically as an array formula I think

  5. #5
    Forum Expert Crooza's Avatar
    Join Date
    10-19-2013
    Location
    Hunter Valley, Australia
    MS-Off Ver
    Excel 2003 /7/10
    Posts
    2,082

    Re: Std deviation for multiple ifs

    OH I should have said this is based on your data being in date order. saves having to put in another 'and' statement but if your data isn't in date order like your example let me know and I'll amend formula

  6. #6
    Registered User
    Join Date
    07-10-2012
    Location
    NSW, Australia
    MS-Off Ver
    Excel 2010
    Posts
    76

    Re: Std deviation for multiple ifs

    Thank you for the response, however, that formula does not seem to provide the correct values for the std dev.

  7. #7
    Forum Expert Crooza's Avatar
    Join Date
    10-19-2013
    Location
    Hunter Valley, Australia
    MS-Off Ver
    Excel 2003 /7/10
    Posts
    2,082

    Re: Std deviation for multiple ifs

    The top ones will have a SD of 0 because there's only one value. Can you tell me what you think the standard deviation is for a few of the results?

  8. #8
    Forum Expert Crooza's Avatar
    Join Date
    10-19-2013
    Location
    Hunter Valley, Australia
    MS-Off Ver
    Excel 2003 /7/10
    Posts
    2,082

    Re: Std deviation for multiple ifs

    Further to above I just did the Sd for Steve on my scientific calculator and got 33.09 which I recall was what the formula gave so not sure what isn't working for you

  9. #9
    Registered User
    Join Date
    07-10-2012
    Location
    NSW, Australia
    MS-Off Ver
    Excel 2010
    Posts
    76

    Re: Std deviation for multiple ifs

    You are right, it seems to work against the manual calculations with the exception of one row (which I have highlighted in yellow).

    Thanks for your ongoing assistance here!
    Attached Files Attached Files

  10. #10
    Forum Expert Crooza's Avatar
    Join Date
    10-19-2013
    Location
    Hunter Valley, Australia
    MS-Off Ver
    Excel 2003 /7/10
    Posts
    2,082

    Re: Std deviation for multiple ifs

    I get the SD of 765, 607 and 606 as 74.7 which is what the excel formula gives me. What figures did you use for Harry to get 91.5 and if they were different to these three why?

  11. #11
    Registered User
    Join Date
    07-10-2012
    Location
    NSW, Australia
    MS-Off Ver
    Excel 2010
    Posts
    76

    Re: Std deviation for multiple ifs

    I have found the problem, it was STDEV.S instead of STDEV.P for that harry case.

    Thank's so much for your help. Outstanding!

  12. #12
    Forum Expert Crooza's Avatar
    Join Date
    10-19-2013
    Location
    Hunter Valley, Australia
    MS-Off Ver
    Excel 2003 /7/10
    Posts
    2,082

    Re: Std deviation for multiple ifs

    Great. Glad it worked

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Standard Deviation Using Multiple Criteria
    By T86157 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-19-2014, 09:57 PM
  2. [SOLVED] how do you find the SD(standard deviation ) for the multiple reg
    By Jerry W. Lewis in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-06-2005, 12:05 PM
  3. [SOLVED] how do you find the SD(standard deviation ) for the multiple reg
    By Basem Salman in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 10:05 AM
  4. [SOLVED] how do you find the SD(standard deviation ) for the multiple reg
    By Jerry W. Lewis in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-06-2005, 06:05 AM
  5. how do you find the SD(standard deviation ) for the multiple reg
    By Jerry W. Lewis in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-06-2005, 04:05 AM
  6. [SOLVED] how do you find the SD(standard deviation ) for the multiple reg
    By Basem Salman in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 01:05 AM
  7. [SOLVED] how do you find the SD(standard deviation ) for the multiple reg
    By Basem Salman in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 10:05 PM
  8. how do you find the SD(standard deviation ) for the multiple reg
    By Basem Salman in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-07-2005, 10:05 AM

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