+ Reply to Thread
Results 1 to 2 of 2

Auto incrementing excel macro

  1. #1
    Registered User
    Join Date
    11-02-2011
    Location
    Bremen, Germany
    MS-Off Ver
    Excel 2010
    Posts
    1

    Auto incrementing excel macro

    How do I auto-update the cell references in my macro to reflect today's stock data.

    I have a stock spreadsheet for which I wrote simple macros. One tab has the source data which is stock prices. The other tab contains simple macros that identify price changes from day 1, price change the last week, and the last month.
    The layout of the source data tab is: The date field is in row 1 and each day is in its own column. The stocks are in column A and their daily prices are to the right of them.
    The layout of the macro tab (that refers to the source data tab) is: Column A: simple calc of price change from yesterday. Column B has calculates the price change from one week ago. Column C has price change calculation from one month ago.

    Currently, I manually update the macro tab calculations to by one cell to the right so that I am including the most recent data.
    What changes to the macro can be made to auto-increment the macro to reference today's stock price column cells from the source data tab.
    Attached Files Attached Files
    Last edited by OvertheRhein; 11-07-2011 at 08:18 PM. Reason: Unlocked the excel macro equations on 7 November

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Auto incrementing excel macro

    Hello OvertheRhein,

    Welcome to the Forum!

    To answer your question, it will be necessary to see the macro code you are using.

    To Attach a File:
    1. Scroll down to the window below your post Additional Options
    2. In the frame Attach Files you will see the button Manage Attachments
    3. Click the button.
    4. A new window will open titled Manage Attachments - Excel Forum.
    5. Click the Browse... button to locate your file for uploading.
    6. This will open a new window File Upload.
    7. Once you have located the file to upload click the Open button. This window will close.
    8. You are now back in the Manage Attachments - Excel Forum window.
    9. Click the Upload button and wait until the file has uploaded.
    10. Close the window and then click Submit.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

+ 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