We’ll use the data from NASDAQ for the Microsoft Corporation (MSFT) to demonstrate how to import stock prices. Here’s how our final table will look like after importing it to Excel.
How to Import Stock Prices into Excel from Google Finance: 3 Methods
Method 1 – Import Stock Prices from Google Finance on Web
We need to import Stock Prices data from Google Finance to Google Sheets using the GOOGLEFINANCE function. Then, we’ll import that into Excel using Power Query.
Step 1 – Import Stock Prices from Google Finance to Google Sheets
- Go to Google Sheets and open a new file.
- Type the following formula in cell A1:
=GOOGLEFINANCE("MSFT","all","5/8/2022","5/17/2022","Daily")
Formula Breakdown
- MSFT stands for Microsoft Corp.
- We’ve put ALL in the second argument. This will return the following information for the specified date range –
- Opening Prices.
- Closing Prices.
- High Prices.
- Low Prices.
- Share Volumes.
- We’ve specified the date range from 8-May-2022 to 17-May-2022.
- We’ve defined the frequency as Daily.
- Press Enter.
- We’ll get the stock price in Google Sheets.
Step 2 – Publishing the Google Finance Stock Prices Data
- Go to File, select Share and choose Publish to web.
- A dialog box will appear. Click on the Publish button.
- Press Ctrl + C to copy the link.
Step 3 – Importing Stock Prices into Excel
- Open an Excel file, go to the Data tab, and select From Web.
- A dialog box will appear. Paste the link address inside the URL box and press OK.
- Select Table 0 and press Transform Data.
- This will import the Stock Prices into Excel Power Query.
Step 4 – Modifying the Stock Prices Inside Power Query
- Select the first two columns and pick Remove Columns.
- Select Use First Row as Headers to get rid of the first row.
- The Stock Price information should look much cleaner now.
- Import this to Excel by pressing Close & Load from the Home tab.
- This is what the final result should look like.
Step 5 – Updating the Stock Prices
- Go back to the Google Sheets file.
- Change the formula in cell A1 as follows.
=GOOGLEFINANCE("MSFT","all","5/8/2022","5/20/2022","Daily")
- We’ve added 3 new rows to the dataset.
- Select anywhere in the “Table0” in Excel.
- From the Query tab, select Refresh.
- This will update our dataset from the Google Sheets file.
Read More: How Do You Automatically Update Stock Prices in Excel
Method 2 – Using the Copy and Paste Feature to Import Stock Prices into Excel from Google Finance
Steps:
- Follow the steps of Method 1 to import Stock Prices from Google Finance to Google Sheets.
- Select the cell range A1:F10 in the Google Sheets file.
- Press Ctrl + C to copy the dataset.
- Go to an Excel file and make a table with the same number of columns and rows.
- Right-click on cell B4 to bring up the Context Menu.
- Select Match Destination Formatting from Paste Options.
- This will import Stock Prices into Excel.
Method 3 – Using the Download Option to Import Stock Prices from Google Finance
Steps:
- Follow the Steps of Method 1 to import Stock Prices from Google Finance to Google Sheets
- In Google Sheets, go to File, select Download, and choose Microsoft Excel (.xlsx).
- Open the file via Excel.
- Copy and paste the information into the desired Excel file.
Read More: How to Get Live Stock Prices in Excel
Download the Practice Workbook
Related Article
<< Go Back to Stocks In Excel| Excel for Finance | Learn Excel
Get FREE Advanced Excel Exercises with Solutions!