+ Reply to Thread
Results 1 to 3 of 3

copying a "moving average" formula?

  1. #1
    Registered User
    Join Date
    11-22-2010
    Location
    Mornington Australia
    MS-Off Ver
    2010
    Posts
    2

    Angry copying a "moving average" formula?

    I have created a formula for calculating an average for amounts in a column. I wish to be able to copy that formula down a column.

    The formula I have used is =AVERAGEIF(K3:K4,"<>0")

    When I copy this and paste it into the other cells in the column, the first cell reference does not "lock"

    Ie. the result I want is =AVERAGEIF(K3:K5,"<>0")
    =AVERAGEIF(K3:K6,"<>0")
    =AVERAGEIF(K3:K7,"<>0")
    etc in the consectutive cells running down the page.

    But The result I get is =AVERAGEIF(K4:K5,"<>0")
    =AVERAGEIF(K5:K6,"<>0")
    =AVERAGEIF(K6:K7,"<>0")
    ETC.

    Please, How do I copy such a formula??

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885

    Re: copying a "moving average" formula?

    Hi Warstar, welcome to the forum.

    Use $'s next to the row number, for example:

    =AVERAGEIF($K$3:K4,"<>0")

    When you fill that down, K4 will update, but K3 will remain constant.

    For more information about this subject, search for Relative and Absolute cell references.

  3. #3
    Registered User
    Join Date
    11-22-2010
    Location
    Mornington Australia
    MS-Off Ver
    2010
    Posts
    2

    Re: copying a "moving average" formula?

    Thank you V V much. (I spent about 2 hours trying to resolve the problem.) So simple!!

    Will do the research you suggested. Again my thanks.

+ 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