How to Create a Spreadsheet With Updating Stock Prices Version 3, February 2015



Similar documents
Getting Started with Excel Table of Contents

Basic Pivot Tables. To begin your pivot table, choose Data, Pivot Table and Pivot Chart Report. 1 of 18

MS Excel. Handout: Level 2. elearning Department. Copyright 2016 CMS e-learning Department. All Rights Reserved. Page 1 of 11

Quick Start Guide. Highly customizable automated trading Automate your trades according to rules and models you create.

Task Force on Technology / EXCEL

Instructions for applying data validation(s) to data fields in Microsoft Excel

Advanced Excel 10/20/2011 1

In-Depth Guide Advanced Spreadsheet Techniques

How to Excel with CUFS Part 2 Excel 2010

How to use MS Excel to regenerate a report from the Report Editor

Excel Project Creating a Stock Portfolio Simulation

Creating and Using Forms in SharePoint

Designed by Jason Wagner, Course Web Programmer, Office of e-learning ZPRELIMINARY INFORMATION... 1 LOADING THE INITIAL REPORT... 1 OUR EXAMPLE...

Simplified Valuation Exercise & Ratio Analysis

Introduction to Microsoft Access 2003

Using Microsoft Excel to Manage and Analyze Data: Some Tips

Advanced Excel Charts : Tables : Pivots : Macros

Estimating a market model: Step-by-step Prepared by Pamela Peterson Drake Florida Atlantic University

Migrating to Excel 2010 from Excel Excel - Microsoft Office 1 of 1

Create a New Database in Access 2010

Microsoft Excel 2007 Consolidate Data & Analyze with Pivot Table Windows XP

Here is a Trial Balance sample, generated and exported into an Excel spreadsheet, by an accounting software*

RIT Installation Instructions

1. Linking among several worksheets in the same workbook 2. Linking data from one workbook to another

Word 2010: Mail Merge to with Attachments

Microsoft Query, the helper application included with Microsoft Office, allows

Q&As: Microsoft Excel 2013: Chapter 2

How To Create A Powerpoint Intelligence Report In A Pivot Table In A Powerpoints.Com

Tommy B. Harrington 104 Azalea Drive Greenville, NC

Importing and Exporting With SPSS for Windows 17 TUT 117

Excel Templates. & Quote/Invoice Maker for ACT! Another efficient and affordable ACT! Add-On by V

Monthly Payroll to Finance Reconciliation Report: Access and Instructions

Excel 2003 A Beginners Guide

Programming in Access VBA

Google Docs, Sheets, and Slides: Share and collaborate

Working together with Word, Excel and PowerPoint

Microsoft Excel Tutorial

Excel 2007 A Beginners Guide

MICROSOFT ACCESS STEP BY STEP GUIDE

Excel Intermediate Session 2: Charts and Tables

ECDL. European Computer Driving Licence. Database Software BCS ITQ Level 1. Syllabus Version 1.0

Pharmacy Affairs Branch. Website Database Downloads PUBLIC ACCESS GUIDE

Creating Personal Web Sites Using SharePoint Designer 2007

How to Mail Merge PDF Documents

Rochester Institute of Technology. Oracle Training: Advanced Financial Application Training

Scott Harvey, Registrar Tri County Technical College. Using Excel Pivot Tables to Analyze Student Data

PortfolioCenter Export Wizard in Practice: Evaluating IRA Account Holder Ages and Calculating Required Minimum Distribution (RMD) Amounts

MoCo SMS Suite Quick Guides for Direct Marketing and CRM

Using Excel as a Management Reporting Tool with your Minotaur Data. Exercise 1 Customer Item Profitability Reporting Tool for Management

How to Use a Data Spreadsheet: Excel

Calculating Cash Flow Using Excel Data Lists

Microsoft Excel 2010 Linking Worksheets and Workbooks

A guide to bulk deposit submissions

Website Development Komodo Editor and HTML Intro

Introduction to Microsoft Excel 2010

A Quick Tour of F9 1

SECTION 5: Finalizing Your Workbook

WHAT S NEW IN MS EXCEL 2013

Sage Intelligence Report Designer Add-In

Excel Reporting with 1010data

Excel Spreadsheet Activity Redo #1

Excel macros made easy

ICP Data Entry Module Training document. HHC Data Entry Module Training Document

SPSS for Windows importing and exporting data

Creating Tables ACCESS. Normalisation Techniques

How to Use Excel for Law Firm Billing

Tools for Excel Modeling. Introduction to Excel2007 Data Tables and Data Table Exercises

As in the example above, a Budget created on the computer typically has:

Two new DB2 Web Query options expand Microsoft integration As printed in the September 2009 edition of the IBM Systems Magazine

27 Spreadsheet. modelling. Learning outcomes. Credit value: 10

Introduction to MS WINDOWS XP

EXCEL PIVOT TABLE David Geffen School of Medicine, UCLA Dean s Office Oct 2002

Jefferson County Public Schools. FRYSC Tips and Tricks

Excel 2007 Basic knowledge

Excel Integrated Reporting

WebSphere Business Monitor V6.2 KPI history and prediction lab

If you re like most project managers, you juggle several projects at the same time.

EXCEL Using Excel for Data Query & Management. Information Technology. MS Office Excel 2007 Users Guide. IT Training & Development

Indiana County Assessor Association Excel Excellence

How to Create and Send a Froogle Data Feed

Notes on Excel Forecasting Tools. Data Table, Scenario Manager, Goal Seek, & Solver

Google Docs: Share and collaborate

Microsoft Excel Introduction to Microsoft Excel 2007

ACADEMIC TECHNOLOGY SUPPORT

warpct.com Working with MS Excel 2003 Workbook courseware by WARP! Computer Training

Lab 2: MS ACCESS Tables

Instructions for Creating an Outlook Distribution List from an Excel File

Why should I back up my certificate? How do I create a backup copy of my certificate?

MS Excel Template Building and Mapping for Neat 5

Excel Database Management Microsoft Excel 2003

Instructions for Using Excel as a Grade Book

Module One: Getting Started Opening Outlook Setting Up Outlook for the First Time Understanding the Interface...

Bulk Upload Tool (Beta) - Quick Start Guide 1. Facebook Ads. Bulk Upload Quick Start Guide

Appointment Scheduler

Wellspring FAX Service 1 September 2015

Using Excel for Business Analysis: A Guide to Financial Modelling Fundamentals

Transcription:

How to Create a Spreadsheet With Updating Stock Prices Version 3, February 2015 by Fred Brack In December 2014, Microsoft made changes to their online portfolio management services, changes widely derided by users. One of the changes seems to have killed the long-standing feature that previous versions of this article promoted. Since then, Microsoft seems to have restored functionality, but it s dicey. If you want to try it, see Version 2 of this article. Fortunately, a fellow named Jeff Lenning created an alternative stock feed using Yahoo, and this document has been modified to use that approach. You can read Jeff s original work at www.excel-university.com/msn-moneycentral-iqy-web-query/, and page down to the December 2014 entries. Fred What we are going to do here is use a feature in Microsoft Excel to access stock prices dynamically. You may be satisfied with just using this feature by itself, or you may choose to tap the resulting data to feed a spreadsheet you build in conjunction with the data. For example, you can multiply the number of shares you own by the current stock price, etc. Personally, I use this feature because I want to add analyst ratings and comments beside my stock holdings, something I can t seem to do with online portfolios. This example assumes MS Office 2010. I can t help you with other releases, but the process may be similar. Let me know! (Someone wrote me that the earlier approach works with Office 2007 with minor adjustments.) This approach depends upon an Excel feature called Workbook Connections. The type of Connection we want used to be supplied automatically by Microsoft; but since it broke, you have to supply your own. It s simple; here are the steps: 1. Open NOTEPAD or another plain text editor to a new file. 2. COPY the following 8 lines exactly from this document into the file: WEB 1 http://finance.yahoo.com/quotes/["quote","enter stock symbols separated by commas."] Selection=2 Formatting=None PreFormattedTextToColumns=True ConsecutiveDelimitersAsOne=True SingleBlockTextImport=False How to Create a Spreadsheet With Updating Stock Prices, V3, by Fred Brack, February 2015 Page 1

3. SAVE the file to My Document/My Data Sources using FILENAME YahooStockQuotes and FILETYPE iqy. Now to do this, you need to override the default filetype which will prespecified by Notepad or another editor. Typically that default filetype will be txt. So change the SAVE AS TYPE to the prespecified All Files (*.*), which lets you add your own filetype. Here s a compressed version of the SAVE dialog box using Notepad: If you want, you can do this in MS Word, save the file as a TEXT file, then rename the file in the My Data Sources directory to remove the.txt suffix. 4. You are now ready to proceed. By the way, I didn t supply this data as a file to you because you should always be leery of downloading a file from someone else s website! However, Jeff does supply a downloadable file on his website referenced at the beginning of this article, if you prefer. Let s start by just looking at the stock data you can access. If a refreshable list of standard information about each of your stocks is all you care about, you can stop there, after you follow the initial steps. 1. Open a new spreadsheet. Type a stock symbols in cell A5. YES, I SAID A5, not A1 or anyplace else!!! Press Enter, and type another stock symbol in A6, and then in A7. For instance, you could enter (starting in A5): AAPL IBM MSFT Move the cursor to cell B1. That s right, top row, second column. 2. OK, I know you are ready to go, but that was just a teaser to get you started. Unfortunately, anytime you want to use the stock feature in a spreadsheet, you have to set it up; so let s do that one-time step now. It s possible the next two steps won t be required, but it s best to check to see if the required option has been prespecified. 3. Select File, Options, Proofing, AutoCorrect Options (yeah, that s weird ). How to Create a Spreadsheet With Updating Stock Prices, V3, by Fred Brack, February 2015 Page 2

4. In the AutoCorrect dialog box now open (yes, weird), select the Actions tab. Enable additional actions should be selected. Also select Financial Symbol. Click OK twice to back out to your spreadsheet. 5. Select the Data tab, click on Connections, then click the Add button in the Workbook Connections dialog box. 6. Select YahooStockQuotes. Click Open, then Close the next dialog box without further action. What you have done here is effectively make this feature available in your spreadsheet. It may be tempting to try to set it up further right here, but don t 7. Back on the Data tab, select Existing Connections this time. The YahooStockQuotes you just activated should be highlighted under Connections in this Workbook. Click Open. In the Import Data dialog box, the cell location you were last at should be prespecified (i.e., =$B$1). If that cell is not specified, then click the correct cell on the worksheet before continuing. 8. Now click Properties... Stop for a moment and think how you will use this spreadsheet. You will be able to do a manual refresh at any time from within the spreadsheet; but if you would like your stocks updated every time you open the spreadsheet, select the Refresh data when opening the file option. Later, you can come back and study and experiment with the other options. Click OK, and click OK again. A dialog box (Enter Parameter Value) should still be open at this point. 9. You are now done with basic setup. It s time to tell MSN what symbols you want reported on. 10. The Enter Parameter Value dialog box should be open. This is where you specify the stock symbols you want reported on! Using your mouse, put your cursor on the first stock symbol in cell A5, press and hold mouse button one, and drag down to ONE CELL BEYOND the last cell (that is, include the blank field below MSFT in our example). We ll discuss why later. Let go. This passes the list of cells to the Parameter box. You should see =Sheet1!$A$5:$A$8 in the box. Select the option Use this value/reference for future refreshes. Do NOT select Refresh automatically when cell value changes (because that option doesn t work when you choose a list of cells here it only works when all your stock symbols are in one cell). Click OK and back out. 11. Wait a few moments, and the spreadsheet should fill with a lot of stock data beginning in B1, the first two lines of which should say Search Finance and Search Web. The first part of your spreadsheet should look something like this: How to Create a Spreadsheet With Updating Stock Prices, V3, by Fred Brack, February 2015 Page 3

12. Examine the new table of data. Note that the first column of new data (B) repeats the stock symbol, but the name of the company doesn t appear anywhere. The third column of new data (D) contains the current stock price. For our purposes, this (column D) is the only field we care about going forward, but you ll note lots of additional data that you may view or use within your own spreadsheet fields. 13. Put your cursor on the number identifying row 6 (in front of IBM). Right click your mouse and select Insert. A blank row opens up between the first two stock symbols. Click cell A6 and type a new stock symbol (e.g., T, for AT&T). Nothing else happens BECAUSE you can t have autorefresh when the stock symbols are in a list of cells, as opposed to a single cell. 14. So now choose the option Refresh All in the ribbon. Click the icon itself,, not the words under the icon (which will invoke a pull-down menu, where you would have to select Refresh All again). The spreadsheet should update with data for the new stock symbol. 15. Notes: a. If you leave a symbol blank (e.g., as if you are trying to create a separator line), the symbol will be IGNORED as input, and the data will move on as if the line weren t present. This means the output table data will not line up with any subsequent stock symbols you have entered! So you can t enter blank stock symbol cells to separate portfolios or to make comments elsewhere in a row for example. (Try it and see what happens. Blank out the T symbol you added and Refresh.) b. If you include an invalid symbol, you will get an error message where the symbol would normally be repeated, and the rest of the fields will be empty. c. You must take care in adding new stock symbols to the start or end of the list (as opposed to somewhere in-between), because we predefined the start and end of the list. Strangely, you cannot insert a line above row 5, type a symbol in the new cell A5, and have it work. You must insert a line AFTER row 5, copy the data in A5 to A6, then type the new symbol in A5. Strange but true. At the end, however, you CAN insert a line after the last symbol because we specified an extra blank line as the end of the list. (You did remember to do that, right?) It gets ignored by MSN, but you can place your How to Create a Spreadsheet With Updating Stock Prices, V3, by Fred Brack, February 2015 Page 4

cursor on that line and add a real symbol above it. (Don t make the mistake of just typing END, however, because that s a real stock symbol!) d. If you need to go back and modify the cell list of stocks you want MSN to work on, it s tricky. Here s the sequence: i. Select Existing Connections ii. Right-click YahooStockQuotes iii. Select Edit Connection Properties iv. Select the Definition tab v. Click Parameters e. If you want to use this whole process on more than one worksheet in a workbook, you need to establish separate Connections for each worksheet. You do this by repeating the step where you added the YahooStockQuotes to the workbook. That s right, add it again (and again); then in each worksheet, go into Existing Connections and reference a different listed version of the Quotes (they will be appended 1, 2, etc.), and setup new parameters and output location. (You can rename the Connections at this point, too.) This is how you maintain separate portfolios in one Workbook, each one on a different Sheet (tab). 16. If you are content with what you see, just save the spreadsheet after including your own stock symbols, and you re done. Come back any time to see stock data, with or without modifying the list. But if you want to integrate the results in the table with your own stock data (e.g., quantity, cost basis, etc.), read on 17. Let s expand the spreadsheet. Insert a bunch of columns in front of existing column B so the stock data moves out of our way to the right. For example, insert six columns, pushing the stock data table to column H. (One way to do this is select column B, right click, select Insert, then press function key F4 five times to repeat the Insert.) 18. Type whatever you want for heading and data. The first three lines are free for your use. For example: A B C D E F G H 1 My Stocks (Yahoo table starts here ) 2 Created by Fred 3 4 Ticker Name Qty Price Value Rating Comment 5 AAPL???? 6 IBM 7 MSFT 8 Total How to Create a Spreadsheet With Updating Stock Prices, V3, by Fred Brack, February 2015 Page 5

You will notice that I changed the former BLANK line at the end to the word Total. That works, because Total is not a valid stock symbol. We are now ready to add some data and formulas. 19. Somewhere in your stock data (i.e., outside the Yahoo data), you will probably want a column for company name. I did that above in column B (Name) above, manually, because the company name is not included in Yahoo data (it was in MSN data ). 20. Now you add your own data for your stocks: Quantity you own and any Comments you may wish to make (buy more, sell in May, etc.). You ll most likely wish to widen columns B and G. 21. To pick up stock price, code =J5 in cell D5 (where you see???? above), as J5 is the Last Price field in the Yahoo data, representing the last, or latest, price. (As of the time of this writing, the Yahoo field didn t have a name strange.) 22. Now that you have quantity and price, it is a simple formula to place in cell E5 for Value: =C5*D5. You can propagate these formulas down to the rest of your stock symbol lines. Finally, use a SUM formula on the Total line in E8 to figure the total value of your portfolio. 23. Once you have completed this exercise, you should feel comfortable adding additional fields to your spreadsheet. Then define the print area (just your data), limit the printout to (typically) one page, open your spreadsheet and view or print it. A note regarding Jeff s page at Excel University: I experimented with different options for the Selection parameter in the iqy file, but I personally found they all returned the same data. I was unable to get rid of the news items, for instance, at the bottom of the imported data. It should also be noted that Yahoo COULD change the columns at some time in the future, so you might have to update your spreadsheet accordingly. However, here is an interesting option! If you change the third line in the iqy file to the following http://finance.yahoo.com/d/quotes.csv?s=["quote","enter stocks"]&f=l1 (the next to last character is a lower case L, followed by the number one), then what is returned is ONLY the last (L, get it?) price for the symbol. Thus you could replace the Price column in my example above with the revised Data Connection (starting at the first symbol s price), and the rest of the prices would refresh accordingly. ------- These instructions were originally created by Fred Brack in March 2013; major update with new approach August 2014; and now V3 using Yahoo instead of MSN in February 2015. Comments should be addressed to fbrack@nc.rr.com. DO NOT POST this document without my express written permission! Thank you. How to Create a Spreadsheet With Updating Stock Prices, V3, by Fred Brack, February 2015 Page 6