+ Reply to Thread
Results 1 to 9 of 9

FIFO Method - Tracking

  1. #1
    Registered User
    Join Date
    04-04-2011
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    4

    FIFO Method - Tracking

    Hi All,

    I need help to come up with a solution for FIFO (First In First Out) method for tracking the "buys" and "sells" in a list of stocks. I would prefer a solution without UDF or VB programming (Im not good with those). Just a clever Excel setup/formulas would help tons.

    Example:

    Bond Trans Date Amount
    A Buy 1/1/2010 1,000.00
    A Buy 1/15/2010 1,000.00
    A Sell 1/20/2010 (1,000.00)
    A Buy 1/25/2010 1,000.00
    A Sell 1/30/2010 (2,000.00)
    B Buy 2/1/2010 500.00
    B Buy 2/5/2010 300.00
    B Sell 2/15/2010 (300.00)
    B Sell 2/27/2010 (500.00)
    C Buy 3/6/2010 250.00
    C Sell 3/10/2010 (250.00)
    C Buy 5/2/2010 400.00
    C Sell 5/24/2010 (400.00)

    So, basically I need to apply the first "Sell" date to the first "Buy" date. Stock A was first sold on 1/20/2010 for $1,000, therefore, I would reduce the first "Buy" on 1/1/2010 by the 1,000. This is FIFO method. The raw data comes in this format and we can change/adapt the layout to get FIFO working.

    Thanks for your help!!!

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,053

    Re: FIFO Method - Tracking

    Can you upload EXCEL workbook with desired input and output?
    Never use Merged Cells in Excel

  3. #3
    Registered User
    Join Date
    04-04-2011
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: FIFO Method - Tracking

    How do i attach an excel file?

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: FIFO Method - Tracking

    Go Advanced and then click on Manage Attachments.
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  5. #5
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: FIFO Method - Tracking

    So when you sell stock A (let's say you sold $1200), you first to go the first Buy of A, subtract from there ($1000 in your example) and then, since you still have $200, subtract remainder from purchase 2. Am I interpreting this correctly?

  6. #6
    Registered User
    Join Date
    04-04-2011
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: FIFO Method - Tracking

    Yes, that is the correct interpretation.

  7. #7
    Registered User
    Join Date
    04-04-2011
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: FIFO Method - Tracking

    Actually, lets do a different example. We can forget about the first one. I'm actually looking for the difference between the "Sell" dates and the "Buy" Dates for the related Stocks AND allocate the appropriate amounts.

    Example:

    Stock Buy/Sell Date Amount
    A Buy 1/1/2010 $1,500
    A Buy 5/1/2010 $1,000
    A Sell 6/1/2010 ($1,000)
    A Sell 12/1/2010 ($1,500)

    So, in this example; Im looking to get the days between the First "Sell" date 6/1/2010 and First "Buy" date 1/1/2010. AND apply any remaining amount to the latter dates.

  8. #8
    Registered User
    Join Date
    10-26-2011
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2007
    Posts
    1

    Re: FIFO Method - Tracking

    Was this query solved? I would like to see the solution in a formula (series of formulas).

  9. #9
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: FIFO Method - Tracking

    See FIFO UDF
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

+ 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