+ Reply to Thread
Results 1 to 3 of 3

Using a macro to run many Univariate Regressions over ranges that contain non numeric data

  1. #1
    Registered User
    Join Date
    12-09-2012
    Location
    Dunedin, New Zealand
    MS-Off Ver
    2010 and 2013
    Posts
    13

    Using a macro to run many Univariate Regressions over ranges that contain non numeric data

    I searched this forum and found this code to run 60 simple regressions for a range of data in column 3 against the range data in column 65, then 4 against 66, then 5 against 67, and so on. What I would like is however to modify the code for a range of data that contains non numeric data (i.e. blank but not empty cells like ""). Unfortunately, I can't seem to correctly modify the code in order to make that happen. Can anyone help me please? Thanking you in anticipation.

    Please Login or Register  to view this content.

  2. #2
    Valued Forum Contributor
    Join Date
    03-21-2013
    Location
    cyberia
    MS-Off Ver
    Excel 2007
    Posts
    457

    Re: Using a macro to run many Univariate Regressions over ranges that contain non numeric

    The "ATPVBAEN.XLAM!Regress" regressions will only run on numeric data.

    If you want to use these you should first delete any rows containing blanks or other non-numeric characters, apart from the header row if any.

    'Deleting' doesn't mean you have to modify the data permanently. Only for the purpose of running the regression. You can easily reinstate your data to its original after running the regression.

    Alternatively you can use custom regressions that will skip any row where non-numeric data occurs.

  3. #3
    Registered User
    Join Date
    12-09-2012
    Location
    Dunedin, New Zealand
    MS-Off Ver
    2010 and 2013
    Posts
    13

    Re: Using a macro to run many Univariate Regressions over ranges that contain non numeric

    Thanks Kalak. I remedied this by running a macro to empty and delete blank cells and shift cells up within column prior to running the regression macro, and it had worked a treat.

+ 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. Using a macro in VBA to run regressions
    By NoCover in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-19-2016, 01:53 AM
  2. run several separate regressions from one data base
    By marina1 in forum Excel General
    Replies: 10
    Last Post: 03-31-2016, 06:31 PM
  3. Depicting numeric ranges as single value
    By Bumblbree in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 01-22-2016, 05:42 PM
  4. Excel macro/VBA to do (many) simple regressions
    By mathias00 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-05-2014, 07:36 AM
  5. [SOLVED] Extracting only numeric data from combined numeric & non-numeric data
    By paradise2sr in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-20-2013, 11:51 AM
  6. Macro to run regressions on multiple sheets
    By Costasg in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-03-2011, 02:38 PM
  7. Many Ols Regressions on Many Columns of Data
    By Carpenter9 in forum Excel General
    Replies: 0
    Last Post: 09-12-2006, 02:32 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