+ Reply to Thread
Results 1 to 5 of 5

Thread: Moving Average with conditions

  1. #1
    Registered User
    Join Date
    10-26-2010
    Location
    US
    MS-Off Ver
    Excel 2003
    Posts
    10

    Moving Average with conditions

    I have a set of values say 38 data points, each data point is category 1 or 2. I need to do a moving average of the last 6 values(from bottom to top so to speak) that have a category of 1. I will not know which category is present for each data point at the time of writing the formula . The user will enter the values one at a time over a long period of time. The moving average needs to update after each input(if relevent, if the correct category is entered)

  2. #2
    Valued Forum Contributor
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    1,957

    Re: Moving Average with conditions

    Could you post a sample workbook, please - it would make it much easier to understand the issue you're trying to solve.

  3. #3
    Registered User
    Join Date
    10-26-2010
    Location
    US
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Moving Average with conditions


  4. #4
    Valued Forum Contributor vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - Guimba-Nueva Ecija
    MS-Off Ver
    2010
    Posts
    779

    Re: Moving Average with conditions

    Hello
    from your sample file
    try in D7 - drag down.

    =AVERAGEIF(C3:C8,1,B3:B9)

    don't put $ signs
    Contributors to this forum do not get paid. They give their valuable time to help you solve your problem. That's why feel free to CLICK their STAR icon to say thank you -even the given idea/solution didn't really solve your queries. The time given to you deserves a small gratitude anyway.

    Dare to give a pencil to a child. http://www.blackpencilproject.org/

  5. #5
    Forum Guru shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2007, 2010
    Posts
    25,777

    Re: Moving Average with conditions

    jdm, please take a few minutes to read the forum rules about crossposting and then do as they request.

    Thanks.
    Microsoft MVP - Excel
    Entia non sunt multiplicanda sine necessitate

+ 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.2.0