You are here:

Excel/Using Excel to do FIFO accounting (daily basis)

Advertisement


Question
Hello:
I am wondering if you can help. Please be aware that I am NOT an Accountant.
I need to calculate Profit and loss for a company on a day by day basis for a single security that they trade every day. I receive an electronic spreadsheet, which has 5 columns of data (DATE, BUY/SELL, # SHARES, PRICE, TOTAL). I may be given 2 years worth of trading data for one particular stock. Some days there are many purchases and a few sales. Some days, few purchases and many sales, etc. I have to look at each day, and balance the # of shares purchased against the # of shares sold. Any "leftover" trades are carried over and become the first trade for Day 2. I then balance the purchases and sales for day 2, and carryover the leftover amount to day 3, etc., etc., etc.
Currently, I do this somewhat manually. I balance the shares on Day 1, then cut the "leftovers", then add rows between Day 1 and Day 2, then insert the leftovers, then begin the calculation for Day 2, and so on. I have to believe that Excel can do these calculations for me, but have been unable to do so.
One more thing... after balancing each day on the spreadsheet, I need Excel to calculate a P&L for each NOW BALANCED day. (in other words, even though the "leftover" trades were done on day 1, I need to have them subtotalled with Day 2 P&L, since they are treated as the first trade for Day 2. I cannot change the date for any trade, since that would cause me to lose the ability to audit the trades.
Have I confused you enough yet? Sorry. I can send you a small portion of the spreadsheet so you can more easily see what I am trying to accomplish, if you think that would be helpful. Thanks in advance.
I am using Excel 2000

Answer
I am not an accountant either but I understand what you want done and yes EXCEL can do and give you what you want and need.

Unfortunately, this will take too much time for me to help with.  I am sure you understand that I, and other volunteers, answer questions here on our own free time.

Sorry, it is just too involved.  I am sure you can understand.
About Excel
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here

Excel

All Answers


Answers by Expert:


Ask Experts

Volunteer


Bill

Expertise

I can provide help with most all EXCEL questions and most all questions about writing EXCEL macros. I have been developing macros for about 10 years in EXCEL and have switched to it from Lotus 1-2-3 after about 10 years of writing macros in it. Typically, I will not write a macro for you unless it is very short because of all the details a macro has to know about to work every time all the time. Please understand that I do not know it all and will be the first to say so. As politely as possible, I don't write macros for people on this site who need one, want one, seem to imply that they need one, and/or seem to think I am expected to write one UNLESS they are very short, quick, and simple. 99% of all macros are more involved than what you think and rarely am I provided with enough specific and complete details to have the code work the first time and every time. This typically means too many follow-up emails, and subsequent macro changes due to lack of specific details, just to get those details so that the macro would work, all of which is on my own free time. The voice of experience from responding to many questions from people who ask me to write a macro for them from this site tells me this. I don't mean to come across as unhelpful but macros are usually very specific and without ALL of the specifics the macro I would write will not address all of your needs and the layout, location, formatting, conditions, etc. of your data and any related files the macro would have to work with. What seems like a simple task to you is almost always more involved than what you think to have the macro ALWAYS work in EVERY situation. If you have a macro you have already written and have a question about it then perhaps I could help with that. I am sure and hope you can and do understand.

©2012 About.com, a part of The New York Times Company. All rights reserved.