google-sheetsgoogle-finance

how to get specific year hig/low on to Google sheets


Hi am trying to get the individual high/low in to spcific cell per specific year, I am using google finance to achivie this, however I seem to get some false information. below is the query C7 is the ticker and A22 is the specific year =MAX(INDEX(GOOGLEFINANCE($C$7,"price",DATE(YEAR(TODAY())-A22,MONTH(TODAY()),DAY(TODAY())), TODAY()),0,2))

once I apply this (e.g: AAPL), I get 226.34 accross the board (from year 1 to 8), that doesnt seem to be correct as I am trying to find the year high/low. any help what I am doing wrong here please?

I applied the following query =MIN(INDEX(GOOGLEFINANCE($C$7,"price",DATE(YEAR(TODAY())-A22,MONTH(TODAY()),DAY(TODAY())), TODAY()),0,2))


Solution

  • You may try:

    =max(choosecols(googlefinance($C$7,"price",date(year(today())-A22,1,1),date(year(today())-A22,12,31)),2))