+ Reply to Thread
Results 1 to 3 of 3

Taking the average of multiple groups of cells with ability to extend range of average

  1. #1
    Registered User
    Join Date
    07-26-2019
    Location
    Sudbury, MA
    MS-Off Ver
    2013
    Posts
    2

    Taking the average of multiple groups of cells with ability to extend range of average

    Hi Everyone,

    I am very new to VBA and not particularly skilled at it, but I have a set of data that is being continuously added to that I would like to get averages from. Overall, I have 184 rows of data, and for each one of these rows, I need to take the value of the cell in every 5th column (starting on cell B5), average them together, and have them pasted into a cell on another sheet. The number of rows I have and the locations of where the calculated averages were placed will never change, but the amount of numbers BEING AVERAGED, AKA the amount of columns I have, will increase over time, so I need the calculation to stop at the last filled cell and not continue to average empty cells in further columns. I'm not sure where to even begin on this, so any help is greatly appreciated. I know it's a little confusing, so if clarification is needed let me know. A screenshot of the data I'm looking to be averaged is below for some visual help. Thanks ahead of time!

    Capture.PNG
    Attached Images Attached Images

  2. #2
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,704

    Re: Taking the average of multiple groups of cells with ability to extend range of average

    Hi, I don't think you need to use code here {posted in VBA forum} -- if you're using XL2013 (profile) you should find you can use AVERAGEIF function

    Let's assume your data is held on Sheet1 -- and your 184 results are to reside on Sheet2, A5:A188

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    the above will simply average values in each row where header value of column is Pa.S whilst ignoring blanks.
    Last edited by XLent; 07-27-2019 at 04:54 AM. Reason: typo in narrative

  3. #3
    Registered User
    Join Date
    07-26-2019
    Location
    Sudbury, MA
    MS-Off Ver
    2013
    Posts
    2

    Re: Taking the average of multiple groups of cells with ability to extend range of average

    Thank you so much it worked perfectly! I tried the averageif function before this and it didn't work the way I wanted it to but I must have done something wrong and not realized. Thanks again!

+ 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. [SOLVED] Average ifs with multiple columns as the average range
    By moneypennie21 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 02-15-2017, 08:14 AM
  2. Taking average in 7 cells in a column
    By shawpnik in forum Excel General
    Replies: 3
    Last Post: 11-05-2014, 12:03 AM
  3. Taking Average for Multiple Columns of Varying Length
    By NALynch in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-09-2012, 04:12 PM
  4. Replies: 1
    Last Post: 07-27-2012, 05:37 PM
  5. Replies: 1
    Last Post: 02-18-2012, 12:33 AM
  6. MAX, MIN, MEAN, AVERAGE, MODE for multiple groups...how?
    By || cypher || in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 10:05 AM
  7. [SOLVED] MAX, MIN, MEAN, AVERAGE, MODE for multiple groups...how?
    By || cypher || in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 AM

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