+ Reply to Thread
Results 1 to 2 of 2

VBA code to list the averages of a set of data based on criteria

  1. #1
    Registered User
    Join Date
    10-14-2014
    Location
    Oxford, England
    MS-Off Ver
    2010
    Posts
    63

    VBA code to list the averages of a set of data based on criteria

    Hi all,

    I am looking for a VBA code to list the averages of a set of data based on criteria in a different column. The easiest way for me to explain this is to just show what I mean! The data set will be changing based on a Query result, so it can't be fixed to specific cells.

    Example data:
    Criteria Data
    1 9
    1 3
    1 2
    1 7
    2 8
    2 6
    2 8
    4 3
    4 4
    4 6
    4 7
    4 6
    4 4
    5 2
    5 1
    6 6
    6 5
    6 7
    6 8

    Example desired output:
    Criteria Average
    1 5.25
    2 7.33
    4 5
    5 1.5
    6 6.5

    Any help would be greatly appreciated!

    Thanks,
    Jamie
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,122

    Re: VBA code to list the averages of a set of data based on criteria

    I am trying to attach a Pivot table solution ,but the site is going funny.
    Attached Files Attached Files

+ 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. VBA code for extracting data from a list as per given criteria
    By daksh1981 in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 05-26-2021, 01:03 AM
  2. Find averages for selected ranges based on inputbox criteria
    By dearsong in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-15-2015, 10:55 PM
  3. VBA code to add data in the list that meets certain criteria
    By aman1234 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-22-2014, 06:33 AM
  4. Help: Need to function that averages based on several criteria
    By doubleM3000 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-10-2012, 07:01 PM
  5. [SOLVED] Formula that averages percentages based on said criteria
    By Leif Magnus in forum Excel General
    Replies: 3
    Last Post: 09-14-2012, 04:26 PM
  6. Replies: 2
    Last Post: 11-06-2011, 08:16 PM
  7. Need help with averages based on criteria.
    By mwmcginnis in forum Excel General
    Replies: 4
    Last Post: 02-27-2009, 06:19 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