+ Reply to Thread
Results 1 to 6 of 6

Average last 3 entries in a row exluding not data cella

  1. #1
    Registered User
    Join Date
    04-20-2013
    Location
    Frderick, Md
    MS-Off Ver
    Excel 2003
    Posts
    2

    Average last 3 entries in a row exluding not data cella

    I need only the last three weeks entries to be averaged. My formula is not working. Any help is appreciated.
    Steve
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor AZ-XL's Avatar
    Join Date
    03-22-2013
    Location
    Azerbaijan, Baku
    MS-Off Ver
    Excel 2007
    Posts
    603

    Re: Average last 3 entries in a row exluding not data cella

    Put formula into c3 cell

    =AVERAGEIF(OFFSET(E3,0,LARGE(IF(OFFSET(E3,0,0,1,COUNTA($2:$2)-4)>0,COLUMN(OFFSET(E3,0,0,1,COUNTA($2:$2)-4))-4,""),3)-1,1,COUNTA($2:$2)-4-LARGE(IF(OFFSET(E3,0,0,1,COUNTA($2:$2)-4)>0,COLUMN(OFFSET(E3,0,0,1,COUNTA($2:$2)-4))-4,""),3)+1),"<>0") Ctrl+Shift++Enter

    The formula above arranged to add more weeks. It will always average last-three-non zero weeks.

    Uploading file to analyse

    If your problem is solved Click star
    Attached Files Attached Files
    Appreciate the help? CLICK *

  3. #3
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,844

    Re: Average last 3 entries in a row exluding not data cella

    Wow! Another crazy formula! I was just gonna post a link to daddylonglegs version here: http://www.excelforum.com/excel-form...=1#post3171269

    I put together this UDF that seems to work. Goes either right or left.
    Please Login or Register  to view this content.
    Attached Files Attached Files
    <----- If you were helped by my posts you can say "Thank you" by clicking the star symbol down to the left

    If the problem is solved, finish of the thread by clicking SOLVED under Thread Tools
    I don't wish to leave you with no answer, yet I sometimes miss posts. If you feel I forgot you, remind me with a PM or just bump the thread.

  4. #4
    Registered User
    Join Date
    04-20-2013
    Location
    Frderick, Md
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Average last 3 entries in a row exluding not data cella

    Quote Originally Posted by Jacc View Post
    Wow! Another crazy formula! I was just gonna post a link to daddylonglegs version here: http://www.excelforum.com/excel-form...=1#post3171269

    I put together this UDF that seems to work. Goes either right or left.
    Loving UDF! Is there a way it can consider data that does not have a total of three weeks to average? Two weeks of data would return that average. One week of data would return that score. That would help in in the beginning of the year until competitors have three weeks to average.

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Average last 3 entries in a row exluding not data cella

    Try this array formula** entered in C3 and copied down:

    =IF(COUNT(E3:AB3),AVERAGE(AB3:INDEX(E3:AB3,LARGE(IF(ISNUMBER(E3:AB3),COLUMN(E3:AB3)),MIN(3,COUNT(E3:AB3)))-COLUMN(E3)+1)),"")

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  6. #6
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,844

    Re: Average last 3 entries in a row exluding not data cella

    The lack of testing is showing... It really should do that from the start.
    Replace:
    AverageLast = sum / NoOfInAverage
    with:
    AverageLast = sum / n

+ 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