+ Reply to Thread
Results 1 to 6 of 6

Need help applying a formula to all columns that have heading "Adj Close"

  1. #1
    Registered User
    Join Date
    06-22-2012
    Location
    San Jose, California
    MS-Off Ver
    Excel 2010
    Posts
    15

    Need help applying a formula to all columns that have heading "Adj Close"

    Hey,
    I am trying to write a code which applies a formula that calculates the amount of change in the values of a column. I needed help on how I can apply this to all the columns that are headed by "Adj Close."

    The current code is:
    Please Login or Register  to view this content.
    Last edited by arlu1201; 06-26-2012 at 06:04 AM. Reason: Use code tags in future.

  2. #2
    Forum Contributor
    Join Date
    04-12-2012
    Location
    MD, England
    MS-Off Ver
    Excel 2003
    Posts
    142

    Re: Need help applying a formula to all columns that have heading "Adj Close"

    aad401

    Seems like you have posted twice on the same question.

    Try something like this
    Please Login or Register  to view this content.
    hth

    gmk

  3. #3
    Registered User
    Join Date
    06-22-2012
    Location
    San Jose, California
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: Need help applying a formula to all columns that have heading "Adj Close"

    Hey thanks, that worked out well. Would you happen to know how to edit this code so that the formula can be applied to all of these columns.
    EX: column "E" and "H," and a variable number of other columns also have a set of values in them. How can I change this code so that I can get the corresponding amount of change?

    Thanks

  4. #4
    Forum Contributor
    Join Date
    04-12-2012
    Location
    MD, England
    MS-Off Ver
    Excel 2003
    Posts
    142

    Re: Need help applying a formula to all columns that have heading "Adj Close"

    aad401

    Would you happen to know how to edit this code so that the formula can be applied to all of these columns.
    Not clear what you mean. The code, as requested, will apply the formula in "B" lastrow + 2 to all columns which have the header 'Adj Close' not just cols E,H and K.



    gmk




    If this is the answer you require please remember to mark the the thread as solved and if you feel it is warrented then add to my reputation by clicking on the star at the bottom of my reply.

  5. #5
    Registered User
    Join Date
    06-22-2012
    Location
    San Jose, California
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: Need help applying a formula to all columns that have heading "Adj Close"

    I apologize for the mix up. To be more clear, the current formula simply pastes the calculation for the first column into all the other columns labeled "adj close" rather than recalculating the change for the entire column. I was trying to get a new calculation for each column.

    Thank you very much for all your help. It is much appreciated

  6. #6
    Forum Contributor
    Join Date
    04-12-2012
    Location
    MD, England
    MS-Off Ver
    Excel 2003
    Posts
    142

    Re: Need help applying a formula to all columns that have heading "Adj Close"

    aad401

    This will reproduce the requested formula in all columns headed 'Adj Close' and adjusts for the possible varying number of rows in the target column.

    Be careful if you run the code a second time... it will recalculate the last row in each target column therefore a rerun will include the previous result. Test it to see what I mean.
    If you need the previous result to be removed the code will need to recognise it as a result somehow. If you do need this come back.

    Edit .... Is the result row number fixed as in your first outline i.e. row 15 or variable?

    Please Login or Register  to view this content.
    hth

    gmk




    If this is the answer you require please remember to mark the the thread as solved and if you feel it is warrented then add to my reputation by clicking on the star at the bottom of my reply.
    Last edited by gmk; 06-28-2012 at 05:32 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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