+ Reply to Thread
Results 1 to 6 of 6

Array formula - st deviation

  1. #1
    Registered User
    Join Date
    01-29-2009
    Location
    madrid, spain
    MS-Off Ver
    Excel 2003
    Posts
    26

    Array formula - st deviation

    Hey guys,

    I would need your help, I have a list of 187 countries and I would like to find a way to do this with an array and not by hand.

    Attached here is an excel with a sample; I would like to compute the standard deviation of the variable for the period 1980-2008 for each country separately. Is there a way to do this without me having to select by hand the range corresponding to each country in the st dev formula?

    Thanks a lot,

    Laura.
    Attached Files Attached Files
    Last edited by laurafv; 03-02-2009 at 06:21 PM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Array formula - st deviation

    You could use an Array such as:

    =STDEV(IF($A$2:$A$117=$A2,$C$2:C$117))
    Entered with CTRL + SHIFT + ENTER

    However, it would be easier (& better) to use a Pivot Table with COUNTRY as ROW Field and VARIABLE as DATA Field set to STDEV (rather than SUM).

  3. #3
    Registered User
    Join Date
    01-29-2009
    Location
    madrid, spain
    MS-Off Ver
    Excel 2003
    Posts
    26

    Re: Array formula - st deviation

    hi,

    thanks a lot but the array doesn't seem to work.. I need the st deviation for every single country in the period 1980-2008, not the overall st deviation for all the countries... do you think this can be done with a pivot table or with an array?

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Array formula - st deviation

    You will need to dispense with your Merged cells - using Merged Cells is a no-no on so many levels I woudnt know where to begin.

    The formula provided will give you the STDEV for Argentina if entered correctly... ie the country as specified in A2...

    To reiterate, use a Pivot Table.
    Last edited by DonkeyOte; 03-02-2009 at 06:18 PM. Reason: OP using Merged Cells - rephrase

  5. #5
    Registered User
    Join Date
    01-29-2009
    Location
    madrid, spain
    MS-Off Ver
    Excel 2003
    Posts
    26

    Re: Array formula - st deviation

    you're right, I made a mistake...

    thanks!

  6. #6
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Array formula - st deviation

    Attached is a PT giving you STDEV per country - far better approach IMO.
    Attached Files Attached Files

+ 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