+ Reply to Thread
Results 1 to 11 of 11

Returning Currently-Held Securities from a Transaction Ledger

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    08-25-2014
    Location
    Pennsylvania, US
    MS-Off Ver
    Windows '16
    Posts
    165

    Returning Currently-Held Securities from a Transaction Ledger

    Hi,

    I have a list of transactions, with dates, ticker symbols, share counts, prices, etc. that represent trading in a certain portfolio. The transactions are not all 100% buys or sells, sometimes a fraction of a certain stock is sold. I would like to return a list of currently-held securities as-of a certain date, along with the number of shares held.

    So for example, I would like to turn

    Date Ticker Action Shares
    1/5/15 XOM Buy 200
    1/5/15 PCP Buy 150
    1/6/15 CVX Buy 100
    2/5/15 PCP Sell 90
    3/23/15 CVX Buy 100
    4/6/15 JNJ Buy 45
    4/22/15 JNJ Sell 45

    into a neat table of...

    Ticker Shares
    XOM 200
    PCP 60
    CVX 200
    (at time 8/1/15)

    Is this do-able, and if so how?

    Thanks!

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Returning Currently-Held Securities from a Transaction Ledger

    Try this...
    A
    B
    C
    D
    1
    Date
    Ticker
    Action
    Shares
    2
    1/5/2015
    XOM
    Buy
    200
    3
    1/5/2015
    PCP
    Buy
    150
    4
    1/6/2015
    CVX
    Buy
    100
    5
    2/5/2015
    PCP
    Sell
    90
    6
    3/23/2015
    CVX
    Buy
    100
    7
    4/6/2015
    JNJ
    Buy
    45
    8
    4/22/2015
    JNJ
    Sell
    45
    9
    10
    11
    XOM
    200
    12
    PCP
    60
    13
    CVX
    200

    B11=SUMIFS($D$2:$D$8,$B$2:$B$8,A11,$C$2:$C$8,"Buy")-SUMIFS($D$2:$D$8,$B$2:$B$8,A11,$C$2:$C$8,"Sell")
    copied down
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Contributor
    Join Date
    08-25-2014
    Location
    Pennsylvania, US
    MS-Off Ver
    Windows '16
    Posts
    165

    Re: Returning Currently-Held Securities from a Transaction Ledger

    Hi FDibbins. Thanks for the reply.

    I should add that the ticker of currently-held securities needs to be calculated too. It is far too many to do by hand. So in your example, A11:A13 would be calculated, dependent on an input date. Thanks!

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Returning Currently-Held Securities from a Transaction Ledger

    upload a small (clean) sample workbook (not a pic) of what you are working with, and what your expected outcome would look like.

    Include your input dates

  5. #5
    Forum Contributor
    Join Date
    08-25-2014
    Location
    Pennsylvania, US
    MS-Off Ver
    Windows '16
    Posts
    165

    Re: Returning Currently-Held Securities from a Transaction Ledger

    Attached is an example of what I'm looking for. The colors are just to make things easier to grasp--they're not on the real document. Thanks!
    Attached Files Attached Files

  6. #6
    Valued Forum Contributor
    Join Date
    09-17-2012
    Location
    Johannesburg, South Africa
    MS-Off Ver
    Excel 2007
    Posts
    454

    Re: Returning Currently-Held Securities from a Transaction Ledger

    I think this works (needs 1 helper column):

    transactions_ticker_cy.xlsx

  7. #7
    Forum Contributor
    Join Date
    08-25-2014
    Location
    Pennsylvania, US
    MS-Off Ver
    Windows '16
    Posts
    165

    Re: Returning Currently-Held Securities from a Transaction Ledger

    cylangou, that works perfectly. Thanks! Let me take a further look at it--I want to see if I can add additional filter criteria in--and then I'll mark as solved. Thanks

  8. #8
    Forum Contributor
    Join Date
    08-25-2014
    Location
    Pennsylvania, US
    MS-Off Ver
    Windows '16
    Posts
    165

    Re: Returning Currently-Held Securities from a Transaction Ledger

    How could I filter the results further? For example, the data includes a list that organizes each transaction into Consumer Staples, Industrials, Information Technology, etc. How can I filter so I only see Consumer Staples? The categories are just in a column.

  9. #9
    Valued Forum Contributor
    Join Date
    09-17-2012
    Location
    Johannesburg, South Africa
    MS-Off Ver
    Excel 2007
    Posts
    454

    Re: Returning Currently-Held Securities from a Transaction Ledger

    This should do it:

    transactions_ticker_cy2.xlsx

  10. #10
    Forum Contributor
    Join Date
    08-25-2014
    Location
    Pennsylvania, US
    MS-Off Ver
    Windows '16
    Posts
    165

    Re: Returning Currently-Held Securities from a Transaction Ledger

    That's perfect, thanks.

  11. #11
    Valued Forum Contributor
    Join Date
    09-17-2012
    Location
    Johannesburg, South Africa
    MS-Off Ver
    Excel 2007
    Posts
    454

    Re: Returning Currently-Held Securities from a Transaction Ledger

    Cool, thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. need an audible alarm when real-time securities data reaches certain trigger points
    By okcsteve in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-14-2013, 01:54 PM
  2. Auto transfer some information from stock ledger to Party Ledger......
    By mahsanpk in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 10-04-2013, 02:42 AM
  3. Returning Last Transaction Date
    By snake10 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-10-2012, 04:08 PM
  4. Complicated set of calculations based on transaction IDs, transaction value, etc.
    By BeeZeRCoX in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-14-2011, 11:35 AM
  5. Obtain securities prices automatically
    By madisonsvrt in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-14-2011, 03:14 PM
  6. maturity schedule fixed inc securities by month, quarter and year
    By maturity schedule in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-31-2006, 07:10 PM
  7. [SOLVED] what happens when the right shift key is held down for 8 seconds?
    By renee' in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-01-2005, 02:05 PM
  8. [SOLVED] where are macros held?
    By harry in forum Excel General
    Replies: 2
    Last Post: 01-03-2005, 03:23 PM

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