+ Reply to Thread
Results 1 to 4 of 4

Auto average function

  1. #1
    Diederik
    Guest

    Auto average function

    In Excel there is an autosum function. When you are in an empty cell below a
    range of data this function puts the sum of the range above into the empty
    cell.
    I was wondering if it is possible to adapt this function so that, instead of
    a sum, it calculates a different statistical value like average, number,
    stdev?
    My idea would be an extra button in the toolbar with auto... which opens a
    checkbox menu from which you can choose the statistical function (sum, stdev,
    average etc) that should apply to the range.

    ----------------
    This post is a suggestion for Microsoft, and Microsoft responds to the
    suggestions with the most votes. To vote for this suggestion, click the "I
    Agree" button in the message pane. If you do not see the button, follow this
    link to open the suggestion in the Microsoft Web-based Newsreader and then
    click "I Agree" in the message pane.

    http://www.microsoft.com/office/comm...heet.functions

  2. #2
    Registered User
    Join Date
    06-08-2005
    Posts
    9
    There is a way...if you go to insert--function, the category dropdown box and look at statistical. then you get all sorts of functions you are looking for...
    =average(c1:c23)
    =stdev(c1:c23)... for example

  3. #3
    Forum Expert swatsp0p's Avatar
    Join Date
    10-07-2004
    Location
    Kentucky, USA
    MS-Off Ver
    Excel 2010
    Posts
    1,545
    I'm using XL 2003 and it has the exact feature you are asking for. It is the dropdown arrow next to the AutoSum 'E' on the tool bar. It offers:

    Sum
    Average
    Count
    Max
    Min
    ...plus a link to the Insert Function dialog box.

    HTH

    Bruce
    Bruce
    The older I get, the better I used to be.
    USA

  4. #4
    Diederik
    Guest

    Re: Auto average function

    "rae820" wrote:

    >
    > There is a way...if you go to insert--function, the category dropdown
    > box and look at statistical. then you get all sorts of functions you
    > are looking for...
    > =average(c1:c23)
    > =stdev(c1:c23)... for example
    >
    >
    > --
    > rae820
    > ------------------------------------------------------------------------


    It is too many clicks away before I get the function. I have now found a vb
    workaround that des the trick for me. The code is as follows:

    Sub VariableAverage()

    Dim strFrom As String
    Dim strTo As String

    strFrom = ActiveCell.Offset(-1, 0).Row
    If strFrom = "" Then Exit Sub
    strTo = ActiveCell.Offset(-1, 0).End(xlUp).Row
    If strTo = "" Then Exit Sub

    ActiveCell.FormulaR1C1 = "=average(R" & strFrom & "C:R" & strTo & "C)"

    End Sub



+ 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