I'll describe the process in stages. Here is a command that returns a table with high price on every day within the last 26 weeks:
=GOOGLEFINANCE("GOOG","high",TODAY()-26*7,TODAY())
Output:
+-------------------+----------+
| Date | High |
+-------------------+----------+
| 2/2/2015 16:00:00 | 533 |
| 2/3/2015 16:00:00 | 533.4 |
| ................. | ....... |
Since you only want the maximum of these numbers, let's add a QUERY
selecting the maximum of the second column:
=QUERY(GOOGLEFINANCE("GOOG","high",TODAY()-26*7,TODAY()),"select max(Col2)")
Output:
+----------+
| max High |
+----------+
| 678.64 |
+----------+
This may be already good enough for your purposes. If you want to get rid of the column header "max High", end the query string with label max(Col2) ''
:
=QUERY(GOOGLEFINANCE("GOOG","high",TODAY()-26*7,TODAY()),"select max(Col2) label max(Col2) ''")
Output:
+----------+
| 678.64 |
+----------+
When using query with importrange, the imported columns must be referred to as Col1, Col2, Col3, etc, according to their positions in the imported range. So, you should replace
"select D where V = 1"
with
"select Col4 where Col22 = 1"
The reason is that imported range is not considered a part of any sheet, so its column names are not like sheet column names.
To find the number of a column without reciting the alphabet, you may want to put =column()
in it temporarily.
Best Answer
The
GoogleFinance
command retrieves prices for a particular stock, specified as the first argument of the command. In order to receive data for multiple stocks, you need multipleGoogleFinance
commands, one for each stock.Possible implementation:
B2 =GOOGLEFINANCE(A2,"high")
Then, on another sheet, you put
or (to get only the stock symbols without prices)
Notes