Information Excel 2013 ◉ 21 views Dynamic Array

=STOCKHISTORY()

STOCKHISTORY function

Applies To: Excel for Microsoft 365Excel for Microsoft 365 for Mac
=STOCKHISTORY(stock, start_date, [end_date], [interval], [headers], [property0], [property1], [property2], [property3], [property4], [property5])
Hover argument names in the table for details.
Output typeValue
Popularity15 / 100
VolatileNo
Dynamic ArrayYes
Download sample .xlsx ▦ Try in Playground Dedicated file for this function — safe & lightweight · sample data + live formulas
Share:

⬇ Download Sample Workbook

A dedicated .xlsx for =STOCKHISTORY() with Persian sample data & live formulas — open in Excel and practice.

  • Sheet “Sample” — data table + formula in place
  • Sheet “Guide” — syntax, arguments & tips from this page
  • Instant & secure (token + rate limit)
Download STOCKHISTORY.xlsx ~ 8–12 KB · No macros

⇪ Share

Send this function to friends

Quiz this function

%d questions — syntax, example & errors — test yourself!

◧ Arguments

ArgumentTypeRequiredDescription
stock Text/Range Required Function returns historical price data about the financial instrument corresponding to this value. Enter a ticker symbol in double quotes (e.g., "MSFT") or a reference to a cell containing the Stocks data type. This will pull data from the default exchange for the instrument. You can also refer to a specific exchange by entering a 4-character ISO market identifier code (MIC), followed by a colon, followed by the ticker symbol (e.g., "XNAS:MSFT"). Learn more about our data sources.
start_date Date Required The earliest date for which data is retrieved. Note that if interval is not 0 (daily), the first data point may be earlier than the start_date provided - it will be the first date of the period requested.
end_date Date Optional The latest date for which data will be retrieved. Default is start_date.
interval Number Optional Specifies the interval each data value represents as follows:0 = daily, 1 = weekly, 2 = monthly.Default is 0.
headers Number Optional Specifies whether to display headings as follows:0 = no headers, 1 = show headers, 2 = show instrument identifier and headers.Default is 1 (i.e, show headers). When included, headers are rows of text that are part of the array returned from the function.
property0 - property5 Date Optional The columns that are retrieved for each stock as follows:0 = Date, 1 = Close, 2 = Open, 3 = High, 4 = Low, 5 = Volume.If any of them is present, only the indicated columns are returned in the order provided. Default is 0,1 (i.e., Date and Close).

▣ Examples

Daily history of Microsoft =STOCKHISTORY("MSFT","2024-01-01","2024-12-31",0)
History of the symbol in A2 =STOCKHISTORY(A2,"2024-01-01")

✦ Tips

  • The STOCKHISTORY function requires a Microsoft 365 Personal, Microsoft 365 Family, Microsoft 365 Business Standard, or Microsoft 365 Business Premium subscription.

💬 Comments & Q&A 0 approved

🔒 Your comment will be published after review.

Share your thoughts — visible after admin approval

No comments yet — be the first!

✍️ Add comment / question

captcha
🔒 Your comment will be published after review.