calculating portfolio sheet

G

Guest

Guest
I currently have two sheets with data in my "stocks" workbook.
on sheet1 i have ten columns:
merged (a1:e1) cells --- named "buy" and
merged (f1:j1) cells --- with name "sell".
in "buy" section(a2:e35): a2 - date, b2 - name, c2 - buy price, d2 - number, e2 - total buy; (a3:e35 -buy data);
"sell" section(f2:f28): f2 - date, g2 - name, h2 - sell price, i2 - number, j2 - total sell, (f3:j28 - sell data).

and on sheet2 i have my current portfolio.

what i need to do is the following: assume that in 20.02.2002 i bought 1000 shares of msft and
in 25.02.2002 i sold 700. is there any way to send automatically the name and the number of shares remained (in this case 300 msft) to sheet2. if i buy a new share i also want to send the name and the number of shares to sheet2 and if i sell all shares i want the share name and the numbers to be deleted from sheet2.
can you help me?

thank you.
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

Forum statistics

Threads
1,213,484
Messages
6,113,927
Members
448,533
Latest member
thietbibeboiwasaco

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