challenging "share stock" average prices

Tech-Archive recommends: Speed Up your PC by fixing your registry




heloo
if i have 5 columns like these

suppose that this is a sell and buy stocks forum
the first column is company number
the second column is company name
the third column is for quantity
the forth is for buy price
the fifth column is for sell price
as shwon belo

1 microsoft 100 50
2 sakhr
3 intel
1 microsoft 100 60
1 microsoft 100 (this is blank cell) 40
1 microsoft 100 40

and i want to average the price of the stock (for only the numer one
company (microsoft) )
so the result will be
((100*50+100*60)/(100+100))=55 (is the average price of the 200
stock)(downto the forth row)

then i sell 100 (in the fifth row)
so the result is
100 stock with average price 55
then i buy 100 with price 40
so the final result will be (100*55+100*40)/(100+100)=47.5
how can i do that in excel???


--
amrezzat
------------------------------------------------------------------------
amrezzat's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=28766
View this thread: http://www.excelforum.com/showthread.php?threadid=485837

.



Relevant Pages

  • Re: When is the last time you got money back from Microsoft?
    ... Microsoft was grossly undercharging in order to kill the competition. ... actually selling price. ... cost reaching a point where Microsoft was willing to sell and the ... If you've got an item that you can make for $1 and sell for $10 you ...
    (comp.sys.mac.advocacy)
  • Re: I shouldve listened.....
    ... Well, good, you DON"T want to lose money, you want to make ... or just sell it at this point. ... the stock market: buy on the rumor, ... BUY a stock during a high-volume rapid price rise (better to ...
    (misc.invest.stocks)
  • Re: Buffett disciples
    ... > Price to sell: $??.?? ... > Maybe this advise is just like buy low sell high. ... stock that is temporarily out of favor for a reason that will not last. ... The investors I know call it the 'perfect pitch'. ...
    (misc.invest.stocks)
  • Re: 1 XP Pro CD with 2 lic. keys on 2 computers?
    ... For instance, MS doesn't sell ... product directly to computer stores. ... the price is the same with or ... > Microsoft certificate) that he attaches right to the CD ...
    (microsoft.public.windowsxp.general)
  • Microsofts price for Yahoo loses value in week since offer
    ... Yahoo if the software company's stock continues to drop while Yahoo's ... In the week since Microsoft made its surprise bid for Yahoo, the price ...
    (comp.sys.mac.advocacy)