Where to find the profit / loss view when selling off a whole position in a stock?

I use an Excel spreadsheet to tally purchases, dividends and sales. Annoying that there isn’t anywhere it’s summarised though, I agree.