I am using GoogleFinance() function in Google Sheet for some stocks statistics, but I have problem with some tickers like Tesco (London). If I try GoogleFinance("TSCO", something), I get values of Tractor Supply Company (NASDAQ), because both are TSCO. Is there any possibility, to get Tesco (and other stocks with duplicate tickers)?
Thanks
try:
=IMPORTXML("https://www.marketwatch.com/investing/stock/tsco?countrycode=uk",
"//span[#class='value']")
Related
Looking for a GoogleSheet formula that will bring back
UNIQUE HEADLINES, off GoogleNews specifically by keyword "Tesla"
with Publication Date sorted by ASC
Limit 20 headlines
Then, I want to group headlines by dates.
Thanks in advance!
You can use the =IMPORTFEED() function in Google sheets, and use sort and unique to make sure that you do not have duplicate titles and that they are sorted by date.
First, you need to construct the Feed URL of Google News using this format:
https://news.google.com/rss/search?q=<KEYWORD>
For this case, I used:
https://news.google.com/rss/search?q=Tesla
After that you need to construct the formula:
=IMPORTFEED("https://news.google.com/rss/search?q=Tesla")
Note: By default, you will get the first 20, so the basic =Importfeed() formula will work
To sort the information, since the format of the date is odd, it cannot be sort directly. So I use this formula in the E1 cell:
=INDEX(IF(C1:C20="",,REGEXREPLACE(C1:C20," GMT","")*1))
Lastly, I create a new sheet (name the last one "raw") to sort the date on this one:
=SORT(raw!A1:E20,5,true)
It will look like this:
Reference:
ImportFeed fuction.
Sort Function.
Unique Fuction.
I have been working on a sheet for a while and I would like to use the query function of google sheet for adding the amount of the ingredients of different meals, to create an 'overall' shopping list, but it seems to be that the numbers are not added together.
I have created an example sheet of the problem to spare you from the unrelevant details, here is the link for that: https://docs.google.com/spreadsheets/d/1BHhs9XG5kX-o8pR27L64qAQ08c93bAy1g3YKNI073vY/edit?usp=sharing
Can you help me what I am missing?
use:
=QUERY(A1:C8; "select A,sum(B),C where A is not null group by A,C"; 1)
Having value error in google sheet, within pivot table, calculated field. Using the formula
=SUM("Box Office Revenue ($)")/COUNT("Box Office Revenue ($)".
sounds like average:
=AVERAGE(A2:A)
I'm working on a different Google Sheets spreadsheet to input data (film details such as English Title, Original Title, Release Date, Rating, Country of Origin and a Link), while on the one I'm analyzing the data I managed to use importrange successfully.
Here is the code I used successfully in order to get the average rating of a country's list of movies:
=AVERAGE(IMPORTRANGE("LINK_TO_INPUT_DATA_GOOGLE_SHEETS", CONCAT(A1:A, "!D1:D")))
This average is outputted to column C, while the name of the Country (which is also the name of the sheet for importrange) is in Column A.
I want to create a similar query but for movies that have the Country of Origin matching the Country from Column A (Any movie that has multiple countries of origin are inputted with the first one in the spreadsheet and copied over in all the other countries of origin's respective sheets).
I tried using the QUERY from Google Sheets to make my resultset, but in the best case scenario, it gives the same result as the previous average, while in the worst case scenario it just gives out errors. Here is my latest attempt at the query:
=AVERAGE(QUERY (IMPORTRANGE("LINK_TO_INPUT_DATA_GOOGLE_SHEETS", A1:A), "SELECT Col4 WHERE Col5="&A1&""))
As far as I can tell, this should work, but at the moment it says it cannot find the range or sheet for the imported range.
Any help is deeply appreciated!
EDIT:
Here's a link of the input sheet: https://docs.google.com/spreadsheets/d/1bopmJu7Av71sCh8iUoG20WubGL9ssx09dOnBZnys4Ko/edit?usp=sharing
Here's a link of the analysis spreadsheet (the query should be in the MOVIES sheet):
https://docs.google.com/spreadsheets/d/1-hfQdqvDWXXtGR2fmTy-lZEOtp9sdxkvoget4toi1W4/edit?usp=sharing
I am not sure If I got you right:
- you want: import the average of the ratings (column 4) by movie title (column 1) where the country matches your current column A?
If so it can simply done with queries, especially if you include the average in the query as well. But you need to include all columns you use in the importrange:
=QUERY(IMPORTRANGE("https://...", "Syria!A1:E"),"SELECT AVG(Col4) WHERE Col5='"&A2&"' LABEL AVG(Col4) ''")
Explanation: group by will aggregate all columns by the column you declared as being used as average.
this is the correct syntax:
=AVERAGE(QUERY(IMPORTRANGE("ID_OR_URL"; "Sheet1!A1:A"); "SELECT Col4 WHERE Col5='"&A1&"'"; 0))
I have a Google Sheet with some stock information.
I'm using the formula GOOGLEFINANCE($B2, "price",TODAY()-15) to retrieve historical information about a stock (symbol named in $B2).
That returns a 2x2 table:
Date Close
8/25/2017 17:36:00 7.46
I only want the 7.46:
Using =FILTER(GOOGLEFINANCE($B2, "price",TODAY()-15),{FALSE; TRUE}) I get:
8/25/2017 17:36:00 7.46
I can't see to be able to nest FILTER twice.
I checked the documentation. Other than say that I should not use FILTER to filter columns and rows in the same call, I didn't get much out of it.
I gather a lot of stock information and always use index to get the stock price.
=index(GOOGLEFINANCE($B2, "price",TODAY()-15),2,2)
If you want the date use this. Be sure to format the cell as date or date/time.
=index(GOOGLEFINANCE($B2, "price",TODAY()-15),2,1)
For 2 filters try:
=FILTER(FILTER(GOOGLEFINANCE($B2, "price",TODAY()-15),{false;true}),{false,true})
I prefer query in this case:
=QUERY(GOOGLEFINANCE($B2, "price",TODAY()-15),"select Col2 label Col2 ''")
Also please try this formulas separately:
={false;true}
={false,true}
and see the result.