+ Reply to Thread
Results 1 to 2 of 2

Recorded macro is dependent on amount of input data

  1. #1
    Registered User
    Join Date
    08-22-2016
    Location
    Singapore
    MS-Off Ver
    2016
    Posts
    14

    Recorded macro is dependent on amount of input data

    Hello,

    I recorded a macro in the attached file that computes a rolling correlation of a price series (column B) against a series of ascending numbers (column C). The macro then plots a histogram using the data analysis function.

    It was recorded using 100 rows of price data. If the input data has fewer than 100 rows, the macro will have an error. May I know how I can tweak the code to make it independent of the number of rows of input data? i.e. It will run the correlation until the last row of prices for any number of rows.

    Thank you for your guidance.
    Attached Files Attached Files
    Last edited by huangwh88; 03-15-2018 at 02:46 PM.

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,625

    Re: Price series correlation

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution.

    Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.

    To change a Title go to your first post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.

    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)
    Ben Van Johnson

+ 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] Correlation matrix between series of different lengths
    By VictorOnline in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-28-2016, 09:28 AM
  2. Single cell maximum drawdown from price series
    By DH123 in forum Excel General
    Replies: 2
    Last Post: 05-31-2016, 04:37 AM
  3. Replies: 10
    Last Post: 08-25-2015, 04:58 PM
  4. Cross Correlation analysis with two series of wavelets
    By mrsak87 in forum Excel General
    Replies: 2
    Last Post: 03-06-2015, 10:07 AM
  5. Replies: 0
    Last Post: 06-03-2014, 01:12 AM
  6. [SOLVED] Calculating Correlation Between Two Series of Data
    By JungleJme in forum Excel General
    Replies: 1
    Last Post: 12-14-2012, 03:56 AM
  7. Conditional Correlation within 2 time series
    By pipsturbo in forum Excel General
    Replies: 2
    Last Post: 05-05-2009, 12:45 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