How to Obtain Google Quotes in KMyMoney? - accounting

In order to retrieve the stock quote from Google Finance in KMyMoney do the following:
Goto https://finance.google.com and obtain the symbol, example "NASDAQ:GOOG"
Open KMyMoney, goto Settings->Configure kMyMoney->Online Quotes
Click on the "New" and give the following settings:
URL: http://finance.google.com/finance/info?client=ig&q=%1
Symbol: %1
Price: "l_fix" : "(\d+.\d+)"
Date: "lt_dts" : "(.\d+-\d\d-\d\d)
Date format: %y %m %d
Click on the button "Update". Double click to rename this entry.
In the investment entry page, associate this quoting source. Ensure the symbol is inclusive of the source like NASDAQ:GOOG
To update the quotes, click on the "Tools->Update Stock and Currency Prices".

In order to retrieve the stock quote from Google Finance in KMyMoney do the following:
Goto https://finance.google.com and obtain the symbol, example "NASDAQ:GOOG"
Open KMyMoney, goto Settings->Configure kMyMoney->Online Quotes
Click on the "New" and give the following settings:
URL: https://finance.google.com/finance?q=%1
Symbol: %1
Price: "l_fix" : "(\d+.\d+)"
Date: "lt_dts" : "(.\d+-\d\d-\d\d)
Date format: %y %m %d
Click on the button "Update". Double click to rename this entry.
In the investment entry page, associate this quoting source. Ensure the symbol is inclusive of the source like NASDAQ:GOOG
To update the quotes, click on the "Tools->Update Stock and Currency Prices".

Related

Extracting Info from URL using Google Sheets

I would like to take a URL and extract characters to multiple cells in Google Sheets.
The format of these URLs are:
https://www.sideshow.com/collectibles/{PRODUCT_NAME}-{PRODUCT_ID}
This is an example of the URL:
https://www.sideshow.com/collectibles/marvel-scarlet-witch-sideshow-collectibles-300485
I'd like to extract the following to 2 different cells:
Product ID: 300485 written to cell A1 as 300485
This 6 digit number will change on every URL but it will always be the last 6 characters of the URL
Product Name: marvel-scarlet-witch written to cell B1 as Marvel Scarlet Witch (no dashes, proper case format)
The Product Name, marvel-scarlet-witch, will change with every URL but its position in the URL is constant.
I'm not sure if all this can be done in a single action or if two separate ones would be required.
Alternatively you can also try (assuming string in D1)
=split(proper(substitute(regexreplace(D1, ".*\/(.*?)-side.*?([^-]\d+)$", "$2✓$1"), "-", " ")), "✓")
Change range to suit.
See this link for a brief explanation about the regular expression.
Assuming that the string is in cell C1.
To extract Product ID from the given URL format, use the formula on A1 cell:
=PROPER(SUBSTITUTE(REGEXEXTRACT(C1,".*/(.*)-sideshow-collectibles"), "-", " "))
To extract Product Name from the given URL format, use the formula on B1 cell:
=RIGHT(C1,6)

Google Sheet > Translate String to Function Path

I am creating a summary sheet in which you can select a column title, and below you will get the Sum of this row.
I have a data validation picker that provides you the options, e.g. column "First Col", "Second Col", "Third Col".
Then I translate it using a switch to "A", "B", "C" (actual columns on the other sheet), and even add the full location, e.g. "OtherSheerB2:B10000".
The problem is how can I try to translate the String representing the column as the function path:
In this example, if you chose "Second Col", I will try =Sum("OtherSheerB2:B10000")
and fail :(
Is the idea I am trying even possible? or are there any other suggestion?
Ok so I think I found a solution using SQL e.g.:
=QUERY({OtherSheerB2!$A$2:$T$1000},CONCAT(CONCAT("select sum(Col",M1),")"))
When M1 contains the number of the columns I want to sum.

Is there code that can force a user to enter a particular format into a cell?

I have a Google Spreadsheet.
Google Spreadsheet
When users enter a name into any cell of column A of the sheet named "Unit Standards" I want them to enter that name in a particular format. That is, with the surname first in uppercase then a comma, then the first name in title case then if they are known by a different name that name to be title case in brackets e.g.
BUSH, George
TRUMP, Donald
CLINTON, William (Bill)
CARTER, James (Jimmy)
SMITH-JONES, John
ZETA-JONES, Catherine (Kate)
Is there a way to force them to do that before they leave the cell or the sheet?
You could use a script. Still.
You can have the same results with a simple formula using Data Validation on column A.
This is the formula to put in cell A2 for the range A2:A555:
=REGEXMATCH(A2,"^[A-Z]+\b[',']\s[A-Z]{1}[a-z]+\b(\s([A-Z][a-z]+\b))?$")
Reading the regular expression:
^[A-Z]+\b[',']\s[A-Z]{1}[a-z]+\b(\s([A-Z][a-z]+\b))?$
^[A-Z]+\b: In the beginning have only 1 or more capital letters until the end of the word
[',']\s: Have a , followed by an empty space
[A-Z]{1}[a-z]+\b: Have only 1 capital letter and 1 or more small letters till the end of the word
(\s\([A-Z][a-z]+\b\))?$: All of the above could be followed ? by this string.
\s\(: An empty space and an opening parenthesis (
[A-Z][a-z]+\b: A word starting with just 1 capital followed by 1 or more small letters
\): A closing parenthesis
$: End of string

Single Quote added automatically in front of numeric data when importing CSV file to Google spreadsheet

When I import a csv file to Google spreadsheet a single quote get added in front of all numeric data.
How can I remove that ?
I using import option from file menu
Try this:
right-click the column letter (on columns with numbers)
press Ctrl+F to invoke Google Sheets Search
to the right of the search box, click the ⋮ vertical 3 dots button
to invoke the Find and replace window
in the Find box, put the ' single quote (no space after)
leave the Replace box empty
click the Replace all button (on the bottom)
That should do the trick
put a column in notepad ++ enter image description here
make replace, and return column to GD
For me "Find and Replace" didn't work since those single quotes are not found by it.
I could only get rid of the single quotes by formatting affected cells/column as an integer numeric one.

GoogleFinance - Remove USD Symbol

Using google spreadsheets to display currency data, with USD as primary field for formula: =LEFT(V10*GoogleFinance("currency:USDEUR"),5)
I cannot figure out how to remove the the USD Symbol ($) from not show up for the additional currencies. It makes no sense to have the **$**xxx being displayed on non-USD data.
I have tried doing Format -> Numbers but none of those options resolve this issue.
The number formats are not working since the LEFT function is converting the value to text. Does this formula work instead:
=SUBSTITUTE(LEFT(V10*GoogleFinance("currency:USDEUR"),5),"$","")
Highlight the cells you want to change. Go to Format --> Number --> More Formats --> Custom number format. Highlight the "$" and delete it (delete the quotes and dollar sign both). Click apply. I have attached before and after pictures.

Resources