Help, very basic user here. Trying to match data to most recent match of data in 2 columns and then perform multiple calculations. Thanks for any hel

Rick R

New Member
Joined
Jun 17, 2015
Messages
36
First time I have been in a forum and not very experienced with excel, sorry in advance of any errors I make.


Goggle has got me this far but I am stuck. I am trying to create a stock trading journal that has some calculations in it. I am sure it's no work of art but again, not even basic user here.

I would Like to have excel scan the same column, backwards in time for the first exact match of a stock symbol (Whatever symbol I last entered) and confirm its a match by a date in a second column, same row. If its a match then perform a calculation in another column.

See link for picture of my spreadsheet, I removed many of the non important columns.

Downloading from DiskStation

Currently I am using =IF(D6="Stock",H6/J6,G6*J6/E6) (in the stocks current cost basis columns (K) to give me the cost basis if its a purchase designated by the word stock, otherwise give me the per share cost or profit earned by the trade.
There can be multiple columns based on there being more then one lot of stocks currently open.

What I would really like to have happen is to have it do what it's doing now only to match up the trades and keep a running total of the cost basis increasing or decreasing in column (K) depending on the lot... look back to the date each stock was purchased and then match up the trades based on the stock symbol and purchase date... then reduce the last cost basis by the net premium per share (Column G) and put that total in the (Stocks Current Cost Basis Lot(K) or the column next to it (L) if another column is needed to do the calculation... row by row/ trade by trade.

Can this be done? How?

Please ask me any question if I was not exact or clear.

Thanks,

Rick

pCCRXwYc
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand

Forum statistics

Threads
1,214,965
Messages
6,122,499
Members
449,089
Latest member
Raviguru

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