I have a column of currencies & income and I want to convert all of those to a common currency. In my case USD. Many of the rows are already in USD. In that case 'CURRENCY:USDUSD' returns no data. I expected CURRENCY:USDUSD to return 1, it returns #N/A
Here is my solution to the problem.
Currency Today's rate Rate from USD
CAD =if(A2="USD",1, (index(GoogleFinance("CURRENCY:"&"USD"&A2,"price",today()-2,today(),"daily"),2,2)))
This returns Today's rate, from USD to B1 (CAD), as a single cell. If CAD is replaced with USD, it returns 1.
Currency | Today's rate Rate from USD |
---|---|
CAD | 1.379955 |
USD | 1 |
Put a 3 letter currency code in A2
in B2