P and L

iainsteel

New Member
Joined
Nov 29, 2007
Messages
31
Hello
I am trying to run a p and l spreadheet and I am having an issue with the p and l on sells:

QTY Price In Price Out P and L
5 10.00 6.00 -20
3 11.00 12.00 5
-5 12.00 9.00 -15
-5 15.00 17.00 10

so the p and l calculation is (price out - price in)*qty
so that works when qty is positive but not when qty is negative
(i can sell first then buy back later as well).
How can I modify the formula: (price out - price in)*qty to account for
-ve values in qty. Because using the same formula I am getting the wrong values:
i.e -5 @ 12.00 and then +5 @ 9.00 should equal +15 not -15
and -5 @ 15.00 and then +5 17.00

I hope this is clear - sorry for a not a more challenging question.
Thanks
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
I mean I don't see why the formula doesn't give the right answer for negative quantities. Why should the negative QTY be change to positive for Price Out?
 
Upvote 0
Sorry about all this i overlooked it completely
all i had to do was to:
(a1-b1)*c1 (c1 being a reference to + or -ve. qty.)
apologise for wasting everyones time
Thanks
 
Upvote 0

Forum statistics

Threads
1,224,590
Messages
6,179,749
Members
452,940
Latest member
rootytrip

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top