If you are just wanting to identify the rows as indicated in I6 This formula entered in I3 (assuming data starting in row 3) and filled down will put an X in where there is a match.
Formula:
=IF(SEARCH(H3,$I$6)>0,"x","")
This will enter the profit/loss in column J
Formula:
=IF(AND(C3="buy",I3="x"),($F$6-F3)*E3,IF(AND(C3="dividend",I3="X"),G3,""))
As far as the profit and loss calculation is concerned, I think that I already gave that to you in my previous message. If you are wanting to calculate that for each row. This will work for each row except for Dividends where you will want to add the total amount.
Bookmarks