<php> the_title();</php>

Can Google Sheets Pull Data From Sgx In Google Finance

I was googling recently to see how to import SG stock price into Google Sheets, and found that it seems like we can’t really import the stock price from SGX website.

What I did found was that it was actually easier to track overseas US/HK/UK stocks prices using Google Sheets, compared to tracking stock prices in SGX or the Bursa.

Using GOOGLEFINANCE to track US Stock Prices

For US stocks price tracking, one can simply use GOOGLEFINANCE function found inside Google Sheets.

=GOOGLEFINANCE(“stock symbol”,”price”)

For example, if you want to track apple stock price, type =GOOGLEFINANCE(“AAPL”,”price”) into the cell.

Example: Using GOOGLEFINANCE to import stock price of APPLE

Using IMPORTHTML to track US stocks

But what if you want to track more data like the dividends, PE and other financial ratios. I found that you can import the stock data found at Finviz.com into Google Sheets. See below for the stock information pertaining to Apple (AAPL). The stock price (bottom right), dividends, PE and other related financial ratios can be imported into Google Sheets.

Apple stock information at Finviz.com

So how to do this?

The first thing is to find the table. Through some trial and error, the table is table 8. From inputting the below into the cell, we are able to import all the financial data into Google Sheets. [B14 is the stock ticker for APPLE]

Further Reference:  How Do Vehicle Financing Loans Work

=(importhtml(“http://finviz.com/quote.ashx?t=”&B14 ,”table”,8)

Example: importing all stock information from Finviz.com

But this is not what we want. We want to find the market price, dividend etc. So we need to reference the relevant row and column to display the information required. For market price, it is at row 11 column 12. Dividends is at row 7 column 2. After entering

=substitute(index(importhtml(“http://finviz.com/quote.ashx?t=”&B14,”table”,8),11,12),”*”,””)

we can reference and import the stock price. The SUBSTITUTE function is to replace the asterisk * with blank.

Example: importing and displaying APPLE stock price and dividends

Do note that the table may shift or disappear if the webpage changes layout.

Using GOOGLEFINACE to track HK/UK Stock Prices

For HK/UK stocks, we can use GOOGLEFINANCE function to get the price. If you want to track Alibaba, just type =GOOGLEFINANCE(“9988″,”price”) into the cell

Using IMPORTHTML to track SG stocks

The problem comes when i tried to use GOOGLEFINANCE for SGX stocks. I tried to use GOOGLEFINANCE(“Z74″,”price”) to get Singtel stock price. But it doesn’t work. Seems like Google is not unable to access SGX data or something.

The work-around is to use a similar method like for Finviz.com. I explored Yahoo Finance but the best I could get is the previous closing price, using the below formula

=index(importhtml(“https://sg.finance.yahoo.com/quote/Z74.SI?p=Z74.SI&amp;.tsrc=fin-srch”,”table”,1),1,2)

Example: Singtel previous closing price at Yahoo Finance

I was able to get the market price from Shareinvestor.com though, using the below formula.

=REGEXREPLACE(index(IMPORTHTML(“http://www.shareinvestor.com/fundamental/factsheet.html?counter=O39.SI”,”table”,5),1,1),”[^d]”,””)/1000

Example: Tracking SG stocks using IMPORTHTML

While this may work at the time of this post, it may or may not continue to work in the future. So, please do take note. Also, I believe the method can also work for Bursa stocks.

You can find the above Tracking SGX portfolio Google Sheet here.

Further Reference:  Did Carl Lindner Finance The Atp Tennis Stadium

Hope you find these information useful. Thanks.

Related Posts

Does Bob's Discount Furniture Have Financing

Does Bob’s Discount Furniture Have Financing

Video does bob’s discount furniture have financing Despite having a generic-sounding name, Bob’s Discount Furniture is something of a standout in the retail world. Of course, many…

A Company Would Most Likely Finance __________ Using Short-term Sources

Every business needs funds to support its various needs. Businesses need funds to acquire assets like land, plant, and machinery. But that’s not all that a business…

Does Financed Amount For Car Include Taxes And Fees

Whether you are buying a new or used vehicle, sales tax will affect your total payment and must be paid before you can register your car. Sales…

Does Blue Nile Have Financing

We’ve also written a detailed Blue Nile review, if you want some further reading.May Be of Interest to You Can You Finance A Car If You Have…

Can You Change Finance From One Car To Another

Can I change my car before the end of my finance agreement? Car finance agreements can be long-lasting; in fact, depending on the terms of your loan,…

Can You Get Finance On A Rolex

Video can you get finance on a rolex FREQUENTLY ASKED QUESTIONS If you’re set on getting that Rolex watch from SwissWatchExpo and financing it through Affirm, here…