+ Reply to Thread
Results 1 to 4 of 4

How do i calculate this stocks trading excel?

  1. #1
    Registered User
    Join Date
    04-30-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    2

    How do i calculate this stocks trading excel?

    Hi,

    I would have a sell order match with a buy order, calculate the profit and loss for that particular trade
    problems comes when there are multiple buy order and not enough sell order to square off the trade

    need to write a vba/marco to have the sell order check for the earlier buy order and square off accordingly.
    How should i write the formula ?


    attached excel spreadsheet
    spreadsheet has more details

    Thank you for your time
    Attached Files Attached Files

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: How do i calculate this stocks trading excel?

    Hi nederay,

    Try using the below formula:-

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Example.xlsx

    Regards,
    DILIPandey
    <click on below * if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), [email protected]

  3. #3
    Registered User
    Join Date
    04-30-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: How do i calculate this stocks trading excel?

    Hi DILIPandey,

    Thank you for your time and help.

    however if i remove the earlier buy trade,the one with 11 April the formula would not be able to count the profit.
    and if i also need to take hold of the remaining holding, how do i calculate ?

    thank you

  4. #4
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: How do i calculate this stocks trading excel?

    Formula in D33 is considering only rows 21 to 26 and 11 april's data is row no.12 so no effect of that.

    Regarding holding calculation, I need to see what result you are looking for and I'll try to obtain the same using formula. thanks.


    Regards,
    DILIPandey
    <click on below * if this helps>

+ 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