+ Reply to Thread
Results 1 to 3 of 3

Populating an array with data that fall BELOW the average and calculating the variance

  1. #1
    Forum Contributor
    Join Date
    04-07-2013
    Location
    France
    MS-Off Ver
    Excel 2011
    Posts
    166

    Populating an array with data that fall BELOW the average and calculating the variance

    I am trying to select those values from a one-dimensional range of data that fall below the average. Also, I am trying to count how many of them there are, and finally, to calculate the variance.
    This code doesn't seem to be working and I think the problem comes when I populate the array :/

    Please Login or Register  to view this content.

    I am working with the file in the attachment.
    Attached Files Attached Files
    Last edited by seigna; 05-04-2013 at 04:33 PM.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Populating an array with data that fall BELOW the average and calculating the variance

    An array formula could do the same.

    =VAR(IF(A2:A15<AVERAGE(A2:A15),A2:A15,""))

    Confirm the formula with Ctrl+Shift+Enter


    Otherwise, put the code below in a standard code module; e.g. Module1, and not the Worksheet's code module

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    04-07-2013
    Location
    France
    MS-Off Ver
    Excel 2011
    Posts
    166

    Re: Populating an array with data that fall BELOW the average and calculating the variance

    Does the resulting MoyBelow take into account ONLY the values inside the new v(i,1)?

    Otherwise, would you be able to tell my what's wrong with my formula? (Or anyone else, ofc) - I'd really like to use it in that form... I know I could use worksheet functions but I'll leave that as a last resort option...

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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