+ Reply to Thread
Results 1 to 4 of 4

Help extending code into loop

  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..)

    Please Login or Register  to view this content.
    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.

  2. #2
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Help extending code into loop

    Try this:
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    05-10-2011
    Location
    Miami
    MS-Off Ver
    Excel 2007
    Posts
    28

    Re: Help extending code into loop

    If you all keep responding so fast, I'll never get my coffee break in haha!

    That works really well. Had an error at first, figured out that it does not like that I have text titles in the first row. Deleting these solved it and everything works great!

    Thanks!

  4. #4
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Help extending code into loop

    Glad it worked. We're all so fast because we drink too much coffee. We just can't stop.

+ 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