+ Reply to Thread
Results 1 to 11 of 11

How to automatically pull price history info on stocks

  1. #1
    Registered User
    Join Date
    05-18-2020
    Location
    New Jersey, United States
    MS-Off Ver
    2016
    Posts
    20

    How to automatically pull price history info on stocks

    As seen in the attached file, I have a list of several hundred public companies that I need to pull price performance data for. So far, I've been pulling data from barchart.com manually, but it's becoming tedious. Is there a way I can automate the process by pulling the 6-month, 1yr, and 3yr price % change?
    Attached Files Attached Files

  2. #2
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: How to automatically pull price history info on stocks

    what method are you using to pull it now?

  3. #3
    Registered User
    Join Date
    05-18-2020
    Location
    New Jersey, United States
    MS-Off Ver
    2016
    Posts
    20

    Re: How to automatically pull price history info on stocks

    Hi Adam,
    I've been just going to barchart.com. For example, for aapl, I used https://www.barchart.com/stocks/quotes/AAPL/performance. I took the percent chnnge value for 6 month, 52-week, 3 year and manually fill in the blanks.

  4. #4
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: How to automatically pull price history info on stocks

    Actually the purpose of my question was to say are you copying and pasting the data from the web page to excel? Or are you querying the data manually by pushing buttons in Excel and using menus like for instance the get external data tab in the ribbon or power query? That's what I meant. I'm on a phone at the moment and just looking at the web page, it looks like some sort of table but you can't be sure unless you view the client source code of the page. Once you do that you would be able to tell if you could use get external data in the ribbon in Excel or power query to pull the data into Excel automatically because those features pull from grid type oriented structures on web pages whether they be HTML tables or not. The data doesn't necessarily have to be inside HTML table tags although that is the most commonly recognized structure that Excel accepts. I believe.

  5. #5
    Valued Forum Contributor Haluk's Avatar
    Join Date
    02-14-2019
    Location
    Turkiye
    MS-Off Ver
    2010 - 64 Bit on Windows-11 (22 H2) 64 Bit
    Posts
    1,147

    Re: How to automatically pull price history info on stocks

    As an alternative, I would prefer using "Google Sheets" for this...

    For example, the following formula gets the last stock price for APPLE;

    Please Login or Register  to view this content.

    and, this one gets the highest price of APPLE in the current session;

    Please Login or Register  to view this content.
    and you have many other options to query ...
    Last edited by Haluk; 12-01-2020 at 06:09 AM.

  6. #6
    Forum Expert avk's Avatar
    Join Date
    07-12-2007
    Location
    India
    MS-Off Ver
    Microsoft Office 2013
    Posts
    3,223

    Re: How to automatically pull price history info on stocks

    I don't understand your logic. Because in your file their is no any dates?


    atul


    If my answer (or that of other members) has helped you, please say "Thanks" by clicking the Add Reputation button at the foot of one of their posts.

    Also: if your problem is solved, please take the time to mark your thread as SOLVED by going to the top of your first post, selecting "Thread Tools" and then "Mark thread as solved".

  7. #7
    Valued Forum Contributor Haluk's Avatar
    Join Date
    02-14-2019
    Location
    Turkiye
    MS-Off Ver
    2010 - 64 Bit on Windows-11 (22 H2) 64 Bit
    Posts
    1,147

    Re: How to automatically pull price history info on stocks

    @avk; "date" is current day or the last date where there is available data.

  8. #8
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,860

    Re: How to automatically pull price history info on stocks

    You may find this link interesting. I have been using this for about a year to track particular stocks.

    http://www.michael-saunders.com/stoc...ages/info.html
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  9. #9
    Registered User
    Join Date
    05-18-2020
    Location
    New Jersey, United States
    MS-Off Ver
    2016
    Posts
    20

    Re: How to automatically pull price history info on stocks

    Adam - I've just been copy and pasting so far.

  10. #10
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014
    Quote Originally Posted by fpkid1 View Post
    Adam - I've just been copy and pasting so far.
    Well obviously that won't work :-) do you know how to check the source code to a web page? And have you tried using power query or the other method in the menu options that I gave you previously?

  11. #11
    Registered User
    Join Date
    05-18-2020
    Location
    New Jersey, United States
    MS-Off Ver
    2016
    Posts
    20

    Re: How to automatically pull price history info on stocks

    Adam, I Know how to check the source code of a web page (I'm using chrome), but I'm pretty new to excel so I'm unfamiliar with the other steps. When using power query am i only able to pull from one web page at a time? Since I have a few hundred stock tickers that each need to be looked up separately could power query do that?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Data Type (Stocks) / save price and not change on refresh
    By mikehk in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-29-2020, 03:47 AM
  2. Replies: 2
    Last Post: 08-29-2020, 03:47 AM
  3. Price of Stocks data type
    By andy_2016 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-07-2019, 12:41 AM
  4. [SOLVED] Pull the maximum price based on the Drop-down value in a price list
    By Max_excel in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-11-2018, 05:46 AM
  5. [SOLVED] macro getting price history online
    By knebelcm in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-31-2016, 05:32 PM
  6. Replies: 2
    Last Post: 01-14-2014, 08:31 PM
  7. Replies: 3
    Last Post: 07-17-2012, 03:34 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1