Many functions in Google Sheets return an array as the result. However, I find that there is a lack of built-in support functions in Google Sheets when working with an array.
const pricesWithHeader = ['Close', 10.5, 10.3, 10.1, 10.0];, to get only the last 4 elements
[10.5, 10.3, 10.1, 10.0], I can apply the SLICE method like
const pricesWithoutHeader = pricesWithHeader.slice(1);. How to slice an array in Google Sheets?
The source code and the demo can be found in the blog post
I own and follow several stocks in my investment portfolio. I pick a reference price for each stock. To effectively track the movement of a stock, I need to visualize its 52-week prices based on the reference price that I determined. In this post, I explain how to do so with the SPARKLINE column chart in Google Sheets.