+ Reply to Thread
Results 1 to 2 of 2

Macro to calculate dynamic ranges for multiple values from a second column

  1. #1
    Registered User
    Join Date
    10-24-2013
    Location
    Delaware
    MS-Off Ver
    Excel 2007
    Posts
    1

    Macro to calculate dynamic ranges for multiple values from a second column

    Hi :-)

    It's been 15 years since I have written any VB code - and i've never done VBA in Excel... using excel 2007.

    I need to calculate statistical data for analysis - Min, Max, Mean, Mode, Median, SD...

    I have just two columns that I need to use:

    ColA = Action {Run, Jump, Play, Swim, ...} for example
    ColB = Time Action Took {2.34, 1.24, 5.25, 2.53, ...} for example.

    I created a pivot table for Min, Max, Mean. But when it comes to more complex numbers like Mode, Median, variance, angh not so much.

    I need to write a macro that will dynamically find all of the 'Run' Actions in ColA and Calculate Median, Mode, variance, SDs-3, and then find all the 'Jump' and calculate, etc...

    Data is generated daily and the number of each Action in ColA varies significantly and I have 45 days of data which need quick results so I don't have a lot of time to "play" ;-).

    Help would be greatly appreciated!

    Thanks!

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,917

    Re: Macro to calculate dynamic ranges for multiple values from a second column

    Hi and welcome to the forum

    Off the top of my head, I would suggest that you create a 2nd table that will pull out the data you want (run for instance) and then run your calcs on that? You could even have a few "tables", 1 for each category.

    To offer any deeper suggestions, I would have to see what you are working with
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ 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] Create Multiple Dynamic Named Ranges with a Macro
    By bennank in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-09-2012, 12:55 PM
  2. Extracting Maximum values of a column base on the multiple ranges in rows
    By sepantafa in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-11-2012, 03:06 AM
  3. [SOLVED] Macro to Sort Multiple Dynamic Ranges by Date
    By crikreef in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 08-13-2012, 09:10 PM
  4. MACRO to transform single column to multiple columns, based in dynamic values
    By gaqueiroz in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-08-2012, 01:54 PM
  5. Macro to copy and paste variable ranges according to values in a column
    By abinayan in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-21-2011, 11:11 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