Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Issue with Google Finance in Google Sheets for Currency Exchange Rates

I am using the GOOGLEFINANCE() function in google sheets to get an exchange rate for expenses I am entering in for accounting.

The issue is that sometimes I get an #N/A error with the message

When evaluating GOOGLEFINANCE, the query for the symbol: 'PENUSD' returned no data.

The confusing part is that sometimes, perhaps with a refresh of the page after 5 minutes some cells actually start working and others receive the error. I can't pin the problem down.

On another note, it is obvious that this is a poor way to do currency exchange because it is constantly calculating the rate for a past day. Is there a way to get historical exchange rates as a value, one time? I am thinking a script that for every new "date" entered in the date column calculates the exchange rate for that day and enters in the number in the cell next to it.

Is this possible? Are there any better solutions out there? thanks for the help

like image 624
Catu Avatar asked May 21 '15 17:05

Catu


People also ask

What source does Google use for exchange rates?

Likewise, the data for Google's currency convertor is provided by Morningstar, a US based global provider of financial data. The company aggregates real-time data from worldwide sources, covering major trading venues. These rates are known as wholesale exchange rates.

Can you change currency in Google Sheets?

Changing the Default Currency Format in Google SheetsGo to File then click on settings to open up the spreadsheet settings. In the Locale drop down, select the country you want your default currency format to be set to.

Why is exchange rate on Google is different at banks?

In order to make a profit, banks and other money changers use different rates for buying and selling currency. The online rates you see are probably mid-rates - half-way between the buying and selling rates. Of course, just to be on the safe side, banks also charge commission on the transaction...


2 Answers

Yes, indeed very shaky. The formulas sometimes stop working when I switch to another tab and then come back. What helps me:

  1. Close the tab and reopen (Ctrl-Shift-T). This usualy makes formulas work again for some time.
  2. Select the cells with formulas, copy and paste back as "values only". This will hardcode them, which is actually exactly what I need.
like image 149
altumano Avatar answered Oct 12 '22 22:10

altumano


Belated and somewhat unrelated, but you need to prefix with CURRENCY: these days. I.e. CURRENCY:PENUSD.

like image 2
Kalle Avatar answered Oct 12 '22 21:10

Kalle