Home > Software engineering >  Cannot get HIgh of price range from Google Finance in Google Sheet
Cannot get HIgh of price range from Google Finance in Google Sheet

Time:06-16

I want to get the Highest High from a date range using Google Finance. What I get is the highest high from the next day. Please see the formula I am using, C4 is the start date and E4 is the stock name. For reference you can use "IOC" and date you can use 9th June 2022. It shows the high of 10th instead ignoring the 9th high which was higher.

=iferror(MAX(INDEX({IFNA(GOOGLEFINANCE("NSE:"&$E4, "high", $C4, TODAY()), {"Date", "High"}); NOW(), GOOGLEFINANCE("NSE:"&$E4, "high")},0 , 2)),"")

Please help. Thanks

Edited: Adding the locale details and the price fetching. Price High Low fetch seems to be a day late [H/L fetch is a day late1 [Locale settings2

CodePudding user response:

Try

=index(sort(GOOGLEFINANCE("NSE:"&$E4, "high", $C4, TODAY()),2,0),2,2)

enter image description here

Note that : NSE is located in New York, so about GMT-4, you are located in India GMT 5:30. The values are updated each working day at 4pm, and for you, according to your locale, you are already in the day after at about 1:30am. If you want the correct date, you have to sustract 9:30 to the date given by googlefinance.

  • Related