+ Reply to Thread
Results 1 to 2 of 2

Moving Average based on specific values

Hybrid View

monziskas Moving Average based on... 03-01-2013, 06:26 PM
jkray622 Re: Moving Average based on... 03-01-2013, 10:34 PM
  1. #1
    Registered User
    Join Date
    02-15-2013
    Location
    Fort Myers, FL
    MS-Off Ver
    Excel 2010
    Posts
    1

    Moving Average based on specific values

    I understand how to use OFFSET to calcualte a moving average to say average the 4 values. However, I need to skip rows and only include the rows that match specific criteria. As example, If column A contains employee name and column B contains number of sales. How do I calculate the Bob's Average sales for the last 4 weeks.

    Bob 3
    Mary 2
    Susan 1
    Bob 2
    Mary 6
    Susan 1
    Bob 5
    Mary 3
    Susan 7
    Bob 3
    Mary 1
    Susan 9
    Bob 1
    Mary 5
    Susan 3

    using offset like the below I can get an average of the last for weeks. but how do I get the average of the last for weeks where column A = Bob
    =AVERAGE(OFFSET(B15,0,0,4,1))

  2. #2
    Registered User
    Join Date
    12-16-2012
    Location
    Austin, TX
    MS-Off Ver
    Excel 2010 & 2007
    Posts
    66

    Re: Moving Average based on specific values

    Have you tried the "Averageif" or "Averageifs" functions? Seems like =Averageif(A1:A15,"bob",B1:B15) will average just the values that have Bob.

    As far as setting them to particular weeks, you have no date ranges in your data, so I'm not sure what you want with that? Are you trying to only calculate the average of the last 4 of Bob's entries? Will they always be sequentially? What if Bob is out sick for a week--would you want to calculate zero for him, or leave that week off the calculation?

+ 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