• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Calculate average cost for share transaction with multiple shares in the list

anilbaheti

New Member
Hi All

As per rule, I am opening the new thread to get further help.

I am attaching a template, wherein it calculate average cost on FIFO concept for buying/selling a share. Thanks to the forum to provide the formula as in Col G. However the formula does not work as expected when there are more than one script. I am unable to figure out how to limit the calculate of average per script in Col G.

Appreciate if someone can help on this template.

79610
 

Attachments

  • Calculate Stock Average Price-V2.xlsx
    12.5 KB · Views: 6
I think your formula in column F is incorrect
F2 should be : =SUMPRODUCT(($D$2:D2)*($A$2:A2=A2))/E2
then copy it down

G2: can then become: =SUMPRODUCT(($D$2:D2)*($A$2:A2=A2))/E2
copy it down

Please check those manually
 
Back
Top