STOCKHISTORY function in Excel 365 (2024)

'; var adpushup = adpushup || {}; adpushup.que = adpushup.que || []; adpushup.que.push(function() { adpushup.triggerAd(ad_id); });

Introduction

Excel is a powerful tool for organizing and analyzing data, but manually searchingthrough the history of financial data from different resources can be time-consuming. Inthis article, we will gain deep insights into the StockHistory function that is availableonly in Microsoft 365 and returns the array describing the stock history of financial dataalong with the specific dates that users specified in a range. The benefits of theStockHistory function include time savings, flexibility, comparative analysis, and so on.

Syntax of StockHistory Function

STOCKHISTORY(stock, start_date [,end_date] [,interval] [,headers] [,properties][..])
  • Stock − Specify the cell range or ticker symbol of the corporation in delimiter that is in double quotes which is valid Excel 365. For example, AAL, MSFT.

  • Start_date − It indicates the starting date when the stock data is extracted.

  • End_date − It specifies the ending date that stock data is fetched and is an optional argument.

  • Interval − It is also an optional argument and by default value is 0 representing the Daily stock value whereas 1 denotes the weekly stock value and 2 specifies the monthly stock value.

  • Headers − It is also an optional argument. It permits users whether to showcase headings or not. It comprises three values 0(heading is not illustrated), 1(include headings), and 2(display headers along identifiers).

  • Properties − It is also an optional argument and specifies the Excel columns that are taken out for every stock. It is comprised of 6 numbers that are 0,1,2,3,4,5 and 6 and by default, numbers are 0(Date) and 1(Close). The other numbers of specifications are given in brackets like 2(Open),3(High), 4(Low), and (5) Volume.

StockHistory Function in Excel 365

Step 1

Enter the formula =STOCKHISTORY("MSFT","15/9/2023") in the C3 cell. The headings Date and Close are automatically generated along with the starting date and the stock value when we press the “Enter” key.

STOCKHISTORY function in Excel 365 (30)STOCKHISTORY function in Excel 365 (31)

Step 2

Let’s go with other parameters. Users need to edit the formula =STOCKHISTORY("MSFT","15/9/2023","30/9/2023",1,1) in the same cell as shownbelow −

STOCKHISTORY function in Excel 365 (32)

Explanation

=STOCKHISTORY("MSFT","15/9/2023","30/9/2023",1,1)
  • The first argument represents the ticker symbol of the Microsoft company.

  • The second argument specifies the starting date from which stock data is to befetched.

  • The third argument indicates that the ending date stock data is to be extracted tillthis date.

  • The fourth argument specifies the weekly stock data to be displayed between thespecified dates.

  • The fifth argument denotes the stock data to be fetched along with headers.

Step 3

Press the “Enter” key to obtain the weekly stock data between the prescribed dates along with headers.

STOCKHISTORY function in Excel 365 (33)

Conclusion

This article will guide you through the procedure of using Excel 365's StockHistoryfunction. Users must carefully type the function syntax along with the appropriate parameters to obtain an accurate result.

Updated on: 22-Dec-2023

101 Views

Kickstart Your Career

Get certified by completing the course

Get Started

STOCKHISTORY function in Excel 365 (35)

Advertisem*nts

';adpushup.triggerAd(ad_id); });

STOCKHISTORY function in Excel 365 (2024)
Top Articles
Latest Posts
Article information

Author: Edwin Metz

Last Updated:

Views: 5712

Rating: 4.8 / 5 (58 voted)

Reviews: 89% of readers found this page helpful

Author information

Name: Edwin Metz

Birthday: 1997-04-16

Address: 51593 Leanne Light, Kuphalmouth, DE 50012-5183

Phone: +639107620957

Job: Corporate Banking Technician

Hobby: Reading, scrapbook, role-playing games, Fishing, Fishing, Scuba diving, Beekeeping

Introduction: My name is Edwin Metz, I am a fair, energetic, helpful, brave, outstanding, nice, helpful person who loves writing and wants to share my knowledge and understanding with you.