+ Reply to Thread
Results 1 to 3 of 3

VBA Data Analysis Loop Problem

  1. #1
    Registered User
    Join Date
    07-02-2011
    Location
    Edinburgh, England
    MS-Off Ver
    Excel 2003
    Posts
    1

    VBA Data Analysis Loop Problem

    Hi Everyone,

    I have a macro which runs 25 uni-variate regression using Excel's data analysis. However in writing this macro I manually changed all of the cell range values where the data is in my spreadsheet. I want to integrate a loop into my code in order to speed up the process, have a more efficient macro and be able to perform 200+ regressions multiple times. I do not know what type of loop I should use or how to address the ranges when compiling the loops. My code is as below:
    Please Login or Register  to view this content.
    This cell range moves up one column each time and I want to be able to continue this trend multiple times. Any help would be much appreciated as I am unfamiliar with loops and new to VBA. Thanks very much for any help!

    Regards,

    D.
    Last edited by Leith Ross; 07-10-2011 at 06:04 PM. Reason: Added Code Tags

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: VBA Data Analysis Loop Problem

    Give this a try:
    Please Login or Register  to view this content.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: VBA Data Analysis Loop Problem

    Cross posted at Ozgrid: http://www.ozgrid.com/forum/showthread.php?t=155875

    VBAExpress: http://www.vbaexpress.com/forum/showthread.php?t=38200

    MrExcel:http://www.mrexcel.com/forum/showthread.php?t=563239
    Last edited by Palmetto; 07-10-2011 at 09:44 PM.
    Palmetto

    Do you know . . . ?

    You can leave feedback and add to the reputation of all who contributed a helpful response to your solution by clicking the star icon located at the left in one of their post in this thread.

+ 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