Nick
Nick

Reputation: 29

How to find the average price between two specific dates in the past in Google Sheets Finance

I'm trying to write a formula to give the average price of a stock between two specific dates in the past in Google Sheets Finance, say between October 3rd, 2013 and November 12th, 2013.

If anyone can help, it would be much appreciated.

Thanks, Nick

Upvotes: 1

Views: 1226

Answers (2)

Krzysztof Dołęgowski
Krzysztof Dołęgowski

Reputation: 2660

First you take data from that period. For example: =googlefinance("CURRENCY:EURUSD","price","2013-10-03","2013-11-12","daily")

This builds a table where you have all the rates in 2nd column. Then you have to take only second column using INDEX() formula and take average of it using AVERAGE() formula:

=average(index(googlefinance("CURRENCY:EURUSD","price","2013-10-03","2013-11-12","daily"),,2))

enter image description here

Upvotes: 0

player0
player0

Reputation: 1

try:

=AVERAGE(INDEX(QUERY(GOOGLEFINANCE("TSL"; "price"; "2021/10/03"; "2021/11/12"); 
 "offset 1"; 0);;2))

enter image description here

Upvotes: 1

Related Questions