Results 1 to 4 of 4

Help extending code into loop

Threaded View

beng404 Help extending code into loop 05-18-2011, 11:00 AM
StephenR Re: Help extending code into... 05-18-2011, 11:10 AM
beng404 Re: Help extending code into... 05-18-2011, 11:25 AM
StephenR Re: Help extending code into... 05-18-2011, 11:27 AM
  1. #1
    Registered User
    Join Date
    05-10-2011
    Location
    Miami
    MS-Off Ver
    Excel 2007
    Posts
    28

    Help extending code into loop

    I have a column of data that is interspersed with blank rows signifying a new data group. I want to find the average of each range in the row between each break. The code I have pieced together so far does this perfectly for the first set of data, now I need to get it to loop so that I can average the next group of data below that (and below that, and..)

    Sub Average_range()
    Range("e3").Value = Application.WorksheetFunction.Average(Range("d3", ActiveSheet.Range("d3").End(xlDown)))
    End Sub
    So running down Column D I have:

    A
    A
    A
    A
    A

    B
    B

    C
    C
    C

    etc.

    I need to expand the code so that it not only gives me the average of A's but B's, C's, etc.

    Thanks!
    Last edited by beng404; 05-20-2011 at 10:24 AM.

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