+ Reply to Thread
Results 1 to 3 of 3

Need Formula for calculating average of specified number of consecutive non-blank values

  1. #1
    Registered User
    Join Date
    02-06-2014
    Location
    Pune
    MS-Off Ver
    Excel 2007
    Posts
    2

    Unhappy Need Formula for calculating average of specified number of consecutive non-blank values

    snap.png
    forum_example.xlsx
    I need help to calculate the simple average of specified number of consecutive non blank cells. Pls refer the screenshot or the excel file which will make it clear.

    The problem: Say, I have values in column F starting for cell F6 downwards. In the example there are non blank cells as: F6, F7, F10, F12, F14, F15 thru F19.
    Consider Row number 6 which has Short Avg (of 2 values), Medium Avg (of 3 values) and Long Avg (of 5 values).
    Expected: The Short Avg in cell B6 = (F6 + F7)/2
    The Medium (3 values) in cell C6 = (F6+F7+F10)/3 and
    The Long (5 values) D6 = (F6 + F7 +F10 +F12 + F14)/5 and so forth.
    The Problem: The rows are blank randomly so I do not know the span when my 5 values will be available for the Long Avg, say.
    So there is no pattern as such. In the example the 14th row gets all the 5 values in just 5 rows F14, F15, F16, F17 anf F18.
    Currently I use filter to manually mark the values and use these to manually calculate the average. Of course, the Small/Medium/Long spans are much higher in my real context than 2, 3, 5 as shown in the example above...

    Any help will be highly appreciated.. Thanks in advance
    Last edited by rahuldsi; 02-09-2014 at 12:36 AM.

  2. #2
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Need Formula for calculating average of specified number of consecutive non-blank valu

    Maybe something like this

    =AVERAGEIF(F6:F19,"<>""")

    This will skip empty cells
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  3. #3
    Registered User
    Join Date
    02-06-2014
    Location
    Pune
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Need Formula for calculating average of specified number of consecutive non-blank valu

    Thanks AlKey.. But I need the average of specific number of values in the column and not of all the available ones..

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 17
    Last Post: 06-27-2014, 04:25 PM
  2. Replies: 4
    Last Post: 01-29-2014, 05:34 PM
  3. Replies: 10
    Last Post: 04-25-2013, 06:12 PM
  4. Formula for finding number of consecutive blank cells over a year - See info!
    By oldtauntonian in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-16-2013, 08:31 AM
  5. Replies: 1
    Last Post: 07-20-2005, 04:05 PM

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