Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9786

Append Current Stock Stock Price to Historical Prices

$
0
0

I'm looking to append the current share price of a stock to the end of a period with changing durations.

My current formula for the historical prices is (where cell B3 is a duration of days to retrieve):=GOOGLEFINANCE("AAPL","price",TODAY()-B3,TODAY())

Using the below formulae as shown below returns the current trading price in the same format as the historical prices:=ARRAYFORMULA({TODAY(),GOOGLEFINANCE("AAPL","price")})

Combining the above formulas results in a "#N/A" error:=ARRAYFORMULA({GOOGLEFINANCE("AAPL","price",TODAY()-B3,TODAY())},ARRAYFORMULA({TODAY(),GOOGLEFINANCE("AAPL","price")}))

How can I append today's current trading price to the retrieved historical range when that range is dynamic?


Viewing all articles
Browse latest Browse all 9786

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>