Summary Report Of Shares Bought And Sold

  • A worksheet called "purchases" contains the list of shares purchased during the period 1.4.5 to 31.3.8.


    It has four columns :
    1. Date
    2. Name of the share (name is repeated for every new purchase as it is entered in a new row and is totally independent of the earlier entry of purchase)
    3. Qty
    4. Sale price


    Likewise there is a sheet for sales also.


    I want to do the following:
    a) Find out all the records showing purchases of a particular share and add them up (both quantity and value). And thus, make a list of shares showing aggregate purchase of each share during the entire year.


    Likewise, I want to do this for sales also.


    b) For every share that has been sold within one year after its purchase, apply 20% tax on the profit earned on sale of such share.


    Additional information:


    If 100 shares of A Ltd are purchased on 1.4.5 and 200 shares on 1.5.5 then during the sale of 150 shares of A Ltd on 2.4.6, 100 shares purchased on 1.4.5 and 50 shares purchased on 1.5.5 shall be deemed to have been sold.



    Please guide me on how I should go about the task.



    Thanks in advance

  • Re: Shares Bought And Sold


    use a pivot table

    Jim
    "The problem with designing vba code completely foolproof is to underestimate the ingenuity of a complete fool."

  • Re: Summary Report Of Shares Bought And Sold


    Thanks TheDude,


    MODERATOR NOTICE: This topic has also been posted on other sites and may already have an answer elsewhere. Please take this into consideration when answering this question

    *


    VBA Noob

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!