+ Reply to Thread
Results 1 to 1 of 1

VBA Code for Stock Reinvestment Plan

  1. #1
    Registered User
    Join Date
    11-16-2011
    Location
    Maryland, USA
    MS-Off Ver
    Excel 2003
    Posts
    4

    VBA Code for Stock Reinvestment Plan

    Could someone point me in the right directions of how to right the excel VBA code to auomatically get the desired results as shown in column D for an indefinite amount of rows of the attached spreadsheet image. I am pretty much trying to figure out how to buy a stock on Date A (column A) and Sell the stock on Day B (column B) and make a profit of C % (column C) and then i want to take the profit + my initial investmentment and reinvest it the next row if the previous row sell date is less then the current row buy date. If the previous row sell date is greater than the current row buy date, i want the code to only invest 2k in the current row, but it should also know how much and when any funds are available to be invested and invest the funds accordingly.

    See example in attached image. Thanks a bunch
    Attached Images Attached Images

+ 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