Price Averaging, auto update

C

Courtney S83

I'm doing a project for an Economics class and am having so much trouble,
somebody please help me!
I am trying to come up with a function for a spreadsheet that would take
additions to a price format, average the result in and automatically update
my spreadsheet. I've searched a few knowledge bases, consulted "help", even
talked to people and found no solution. Anybody who has an ideas please HELP!
Here is an example of what I'm trying to update. Column A is the stock
symbol, Column B is stock theoretically sold, Column C the previous average
price. Column D is stock bought and Column E the previous average price for
that.

HBC 200 85.18
HSBA.L 1000 84.95283

Here is an example of what I need added (the message box has wrapped the
line). I need the program to sort sells from buys so it knows where to put
the info. Also Column C (not B, I don't know what that is) here is the actual
stock done. I need the program to find the right stock first. I've tried
using vlookup but for some reason it returns the wrong result. Then I need
the program to figure out a new average price and automatically update the
sheet above, and record the profit or loss. I mean I've done it in steps, but
there are so many steps I'd be better off using a calculator!


SOLD 500 180 HSBA.L 916 DEMO 14:58:08 Day 1.857 1.8576 180 85.0506 0
SOLD 500 320 HSBA.L 916 DEMO 14:58:08 Day 1.857 1.8576 320 85.0506 0
BOUGHT 36 36 HBC 85.13 DEMO 14:58:10 Day 0.0006 36 0 30.6468
BOUGHT 64 64 HBC 85.13 DEMO 14:58:11 Day 0.0006 64 0 54.4832
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top