+ Reply to Thread
Results 1 to 7 of 7

Average a Dynamic Range using the cell before blank cell as the last reference

  1. #1
    Forum Contributor
    Join Date
    02-16-2012
    Location
    Philippines
    MS-Off Ver
    Excel 2007
    Posts
    108

    Average a Dynamic Range using the cell before blank cell as the last reference

    Hi -

    I am in need of a formula that computes the average of dynamic range, I am hoping you can help me. Here's the scenario... I need to get the average of the value from cell A2 down to an unknown location using the cell before the blank cell as the last reference only.
    Lets say the result should be in B2.

    Thank you
    Hudas

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Average a Dynamic Range using the cell before blank cell as the last reference

    So are you saying that there will be blanks (i.e. in A47) and then numbers will continue from that point. Do you want a new average initiated from that point? Uploading an example workbook showing what you want to happen would be very beneifical.
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Forum Contributor
    Join Date
    02-16-2012
    Location
    Philippines
    MS-Off Ver
    Excel 2007
    Posts
    108

    Re: Average a Dynamic Range using the cell before blank cell as the last reference

    Hi-

    Please see sample worksheet. Thank you

    Hudas
    Attached Files Attached Files

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Average a Dynamic Range using the cell before blank cell as the last reference

    Try this formula in B2

    =AVERAGE(A2:INDEX(A2:A$1000,MATCH(TRUE,INDEX(A2:A$1000="",0),0)))

    copy formula to B9
    Audere est facere

  5. #5
    Forum Contributor
    Join Date
    02-16-2012
    Location
    Philippines
    MS-Off Ver
    Excel 2007
    Posts
    108

    Re: Average a Dynamic Range using the cell before blank cell as the last reference

    Thats more like it!! Thank you daddylonglegs...I can't seem to give you star becuase its saying that "You must spread some Reputation around before giving it to daddylonglegs again."

  6. #6
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Average a Dynamic Range using the cell before blank cell as the last reference

    If you never know where the blanks are going to be, try this modification in B2 dragged down

    =IF(ISNUMBER(A1),"",AVERAGE(A2:INDEX(A2:A$1000,MATCH(TRUE,INDEX(A2:A$1000="",0),0))))

  7. #7
    Forum Contributor
    Join Date
    02-16-2012
    Location
    Philippines
    MS-Off Ver
    Excel 2007
    Posts
    108

    Re: Average a Dynamic Range using the cell before blank cell as the last reference

    Thank you both of you!

+ 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