+ Reply to Thread
Results 1 to 4 of 4

how to perform Ttest using Excel VBA on a large dataset

  1. #1
    Registered User
    Join Date
    07-05-2015
    Location
    Virginia,US
    MS-Off Ver
    2013
    Posts
    2

    how to perform Ttest using Excel VBA on a large dataset

    Hi ,
    I have a large dataset of traffic volume for 50 intersections corresponding to 12 movements for 5 time periods in 15 minute intervals for 2 months from consecutive years

    I am trying to make a comparison between same month, same intersection, same movement, same time period using the T Test. How can I implement this in the macro. The problem that I am facing is when the number of time stamps reduce from the 16 ( in the attached file ) to 15 how do I take this into account. Is there a way to perform the test only when intersections ,movement, month, day, time period equals for either year.
    Attached Files Attached Files

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166
    Hello amalchacko,

    Welcome to Excelforum. Be a part of large Excel community. Enjoy Learning.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: how to perform Ttest using Excel VBA on a large dataset

    Hi amalchako,

    We need to be able to define the two ranges specifically - have you criterion for such?
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  4. #4
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: how to perform Ttest using Excel VBA on a large dataset

    Hi amalchako,

    Try this:

    Please Login or Register  to view this content.
    Directions for running the routine(s) just supplied

    If you haven't used macros before you'll need to go to:
    File- options - trust center -trust center settings - macro settings ,
    the second option down (disable all macros with notification)

    Then - Copy the code to the clipboard

    Open your Workbook

    Press ALT + F11 to open the Visual Basic Editor.

    Select "Module" from the Insert menu

    Type "Option Explicit" then paste the code under it

    With the cursor between Sub and End Sub press F5 (F8 to Single Step)

    OR

    Press ALT + Q to close the code window.

    Press ALT + F8 then double click on the macro name

+ 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. Excel 2007 TTest function
    By Dschmieding in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 07-09-2010, 02:10 PM
  2. Function TTEst in Excel
    By Serg in forum Excel General
    Replies: 1
    Last Post: 03-21-2006, 08:55 AM
  3. Ttest
    By Mike Middleton in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 09-06-2005, 04:05 AM
  4. [SOLVED] Ttest
    By Anita in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 AM
  5. [SOLVED] Ttest
    By Anita in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-18-2005, 09:05 PM

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