This is what I use to track shares.
It has 8 columns
The first has the date of purchase
The second is what the stock is, and what account it is (i.e. Vas-D is my account, VAS is my wife - its not case sensitive).
The third is the number of shares bought
The fourth is the total amount it cost (including brokerage costs)
The fifth is unnecessary, but shows the per share cost
The sixth (column G) is the running number of shares for that stock/account
The seventh (H) is the running amount (this is sometimes referred to as base cost)
The eighth (I) is also unnecessary, but shows the running per share cost.
Note that I bold the last entry for each stock/account, just so I can easily recognise it.
So each time I buy a new block of shares, say VAS-D, I'd add a new row, say under column 5, and then
enter the purchase details into columns 1-4, and then paste the formulas from columns 5-8 down into the new row.
If later on I sold all my VAS-D The amount I would have to declare for capital gains would be what I got from the shares, minus whatever is the last figure for that stock in the seventh column (H) (at the moment for VAS that would be 6653.43).
You will probably notice the funny rows on the 30/6/15. With quite a few stocks, a component of their dividends is actually a capital gain - and the way they are to be recorded is as in the sheet, a reduction in the cost base (this means when/if you sell the stock - your capital gain will be bigger - but until then you don't pay any tax on it). In my experience, any stock that does this, will send you a tax statement at the end of each financial year - showing what your amounts are, and telling you what to do.
Well, that went on a lot longer than I thought it would ...