Adding News HTML Links in Excel

This post details adding HTML News Links to an Excel dashboard for monitoring equities and ETFs.

The news source is Finance.Yahoo.com. An example link for Microsoft is https://finance.yahoo.com/quote/MSFT/.

Scrolling down the web site page below the chart are current news stories for Microsoft.

f1

The links can easily be added to an Excel spreadsheet.

f2

Simply copy the URL and select a cell, with the cursor in the formula box paste in the URL and hit enter.

f3

Now, if a stock is showing an unusual amount of activity the link can be selected and your browser opens to the Finance.Yahoo.com page.

This is appropriate for an Excel dashboard that is static in terms of the display. This next dashboard is dynamically ranking the list of stocks based on the percentage net change.

f4

To have the URLs also update requires using VBA code.

First, there is a Rank Tab. Column C ranks the stocks based on percentage net change.

f5

Column F uses VLOOKUP to return the ranked symbols from highest to lowest.

f6

These symbols are used on the Display tab.

f7

The VBA code needs the URLs. Column Q builds the URLs:

=IF(B4="","","https://finance.yahoo.com/quote/"&RIGHT(B4,LEN(B4)-FIND(".",B4)))

The VBA code has two sections. The first is to add the "News" link in column P using the URLs from column Q. The second section copies the current time displayed in cell P3 and pastes the value in cell Q3. The latest update from running the Macro is displayed.

f8

Two dashboards are available, the Basic Quote display and the News Links Sample (ranked) quote display.

Requirements: CQG Integrated Client or QTrader, and Excel 2019 (locally installed, not in the Cloud) or more recent.

Downloads

Disclaimer

Trading and investment carry a high level of risk, and CQG, Inc. does not make any recommendations for buying or selling any financial instruments. We offer educational information on ways to use our sophisticated CQG trading tools, but it is up to our customers and other readers to make their own trading and investment decisions or to consult with a registered investment advisor. The opinions expressed here are solely those of the author and do not reflect the opinions of CQG, Inc. or its affiliates.