Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.
5

Functions like GOOGLEFINANCE are only updated when the spreadsheet is open by a user, there isn't a Google Apps Script method that is able to do this. The closest is SpreadsheetApp.flush() but this only makes that the changes made by the script be pushed to the spreadsheet. One alternative is to rethink your model and take advantage that ... GOOGLEFINANCE ...


4

Try this: =INDEX(SPLIT(INDEX(IMPORTHTML(CONCATENATE("https://finance.google.com/finance?q=", "JNJ"),"table",3),1,2), "/"),1, 2) * 0.01


2

Whenever it refreshes, the data is copied as opposed to new data being added. It seems like it is adding the formula itself to the spreadsheet as opposed to putting in the value itself. If I understand correctly, you want the columns to keep a "snapshot" of the prices at the time the column was added, rather than have the values continue updating. In ...


2

I found a hack that works here as well. Use =min(GoogleFinance("Goog", "PRICE", "3/3/2000")).


1

As the yahoo and google finance API's to use them from google apps script are deprecated, I think the only way to work around it is to generate googlefinance queries from the script as strings and write them in the sheet. Then, once we enter in the sheet those queries are sent. I don't think this is the most elegant way of do this, and it's also pretty ...


1

I believe I figured it out. It's: =STDEV(INDEX(GoogleFinance("GOOGL","all",WORKDAY(TODAY(),-50),TODAY()),,3))


1

=GOOGLEFINANCE() is appropriate. But you can also use IMPORTDATA()


1

=GOOGLEFINANCE("GOOG","CloseYest")


1

A workaround that solves the above is getting the Close price for the stock for a range of days before and after the date in question, and then querying the result for the most recent price on or before that date, like this: =QUERY(GOOGLEFINANCE("GOOG","Close",DATEVALUE("1/1/15")-5,6),"select Col2 where Col1 < date '2015-01-02' order by Col1 desc limit 1"...


1

To further help with this answer. I tried tb11's answer and did not work for me June 2019. It was the URL that was the issue. I picked another site with a simpler URL and it worked for me. Sample below. =SPLIT(INDEX(SPLIT(INDEX(IMPORTHTML("https://finance.yahoo.com/quote/MITT?p=MITT&.tsrc=fin-srch","table",2),6,2),"("),1,2),")") Google, if you ...


1

I used to be able to pull it from google finance, but that stopped working for me a little while back. I found another one. It's not quite as clean, but it is working for me as of March 2019. In column B, put your ticker symbol In column C: =IF(NOT(ISBLANK(B12)),GoogleFinance(B12,"Price"),"") This will populate the current price, which is used in the next ...


1

=BDMIN(GOOGLEFINANCE("Goog"; "PRICE"; "YourStarDate";"YourEndDate");"CLOSE"; GOOGLEFINANCE("Goog"; "PRICE"; "YourStarDate";"YourEndDate")) It works for me. Example for the english locale: =DMIN(GOOGLEFINANCE("Goog", "PRICE", "10/10/2019","10/11/2019"),"CLOSE", GOOGLEFINANCE("Goog", "PRICE", "10/10/2019","10/11/2019"))


1

=INDEX(GoogleFinance("USDIDR", "PRICE", F530),2,2) F530 = cell with date (formatted to date)


1

If the cell is formatted as a NUMBER: =ROUND( ( GOOGLEFINANCE("GOOG","price") / index(GOOGLEFINANCE("GOOG","price", datevalue(today()-365) ) , 2,2) - 1 ) * 100 ,2) Alternative: =ROUND( ( GOOGLEFINANCE("GOOG","price") / index(GOOGLEFINANCE("GOOG","price", date(year(today())-1,month(today()),day(today()))) , 2,2) - 1 ) * 100 ,2) If the cell formatted as ...


Only top voted, non community-wiki answers of a minimum length are eligible