ThrottleWorks
Excel Ninja
Sir, I have 4 columns.
Product id, quantity, date, amount.
This is a data about purchase & sell.
I want to calculate profit/loss on the base of this data.
But there are multiple conditions before getting the result.
For example, I have product Id abc123, I bought 100 @ 10 on 3rd may 2013.
I sold it @ 12 on 25th may 2013. So my profit will be 200.
I have amount column which will give me figure as 1000 for purchase & -1200 for sell.
So I will calculate P&L on the base of this.
I will explain the problem in below examples.
For the same product id abc123, , I bought 100 @ 10 on 15th April 2013.
I sold it @ 12 on 25th may 2013.
In this case I will not calculate profit & loss cause the purchase & sell was not done in the same month.
I will calculate P&L only if transaction is complete in that particular month only.
Another condition is
For the same product id abc123, , I bought 500 @ 10 on 5th May 2013.
I sold 400 @ 12 on 25th may 2013.
But since I have not sold entire product, I will not calculate the profit.
Can anyone help me in this please.
Product id, quantity, date, amount.
This is a data about purchase & sell.
I want to calculate profit/loss on the base of this data.
But there are multiple conditions before getting the result.
For example, I have product Id abc123, I bought 100 @ 10 on 3rd may 2013.
I sold it @ 12 on 25th may 2013. So my profit will be 200.
I have amount column which will give me figure as 1000 for purchase & -1200 for sell.
So I will calculate P&L on the base of this.
I will explain the problem in below examples.
For the same product id abc123, , I bought 100 @ 10 on 15th April 2013.
I sold it @ 12 on 25th may 2013.
In this case I will not calculate profit & loss cause the purchase & sell was not done in the same month.
I will calculate P&L only if transaction is complete in that particular month only.
Another condition is
For the same product id abc123, , I bought 500 @ 10 on 5th May 2013.
I sold 400 @ 12 on 25th may 2013.
But since I have not sold entire product, I will not calculate the profit.
Can anyone help me in this please.