Forum Discussion
STOCK HISTORY FUNCTION OPEN PRICE FOR ONE DATE IN ONE CELL ONLY
- Sep 14, 2024
The date 5 years ago could be not trading date. For such dates stock prices are not published, you need to take latest previous trading date. Using STOCKHISTORY that could be
=TAKE( STOCKHISTORY("MSFT", EDATE(TODAY(),-12*5)-10, EDATE(TODAY(),-12*5),0,0,1), -1)
which returns one-cell value for the closest trading date 5 years ago.
Microsoft Excel is not specialized software to work with market prices. It gives some basics and lot of other functions around. Combining them you could receive desired result.
Instead of hardcoding date, close or open price, etc., you may write your own function to parametrise about depends on your own needs.
The date 5 years ago could be not trading date. For such dates stock prices are not published, you need to take latest previous trading date. Using STOCKHISTORY that could be
=TAKE( STOCKHISTORY("MSFT", EDATE(TODAY(),-12*5)-10, EDATE(TODAY(),-12*5),0,0,1), -1)
which returns one-cell value for the closest trading date 5 years ago.
Microsoft Excel is not specialized software to work with market prices. It gives some basics and lot of other functions around. Combining them you could receive desired result.
Instead of hardcoding date, close or open price, etc., you may write your own function to parametrise about depends on your own needs.
THANK YOU VERY MUCH FOR THIS. SergeiBaklan
- SergeiBaklanSep 22, 2024MVP
dattmuffy15 , you are welcome