It might be easier to use @Dougal1984βs Google Sheets Portfolio Tracker. Have a look at the thread to see if it is of use: