arraysgoogle-sheetsgoogle-query-languagetext-formattinggoogle-finance

GoogleFinance: Get History By Month


I use GoogleFinance quite a bit, but from the documentation it seems the only formats to get historical data is by Day or Week.

Is there any way to get the data by Month?

I guess I could add an extra column, and find the end of each month date to get the value using some calcs, but maybe there's a simpler way to do it?


Solution

  • try:

    =ARRAYFORMULA(SORTN(TEXT(
     GOOGLEFINANCE("NASDAQ:GOOG", "price", DATE(2020,1,1), DATE(2021,2,1), "daily"), 
     {"yyyy mm", "@"}), 9^9, 2, 1, 0))
    

    enter image description here