Getting Exchange Rates Using Stock Data Types


July 29, 2022 - by

Getting Exchange Rates Using Stock Data Types

After Geography and Stock data types debuted, I created a YouTube video and asked people for what other data types they would like. The most popular choice was Exchange Rates, followed by Weather. As of March 2019, Excel is supporting exchange rates, although they are doing it using the stock data type. To get exchange rates, you have to enter the code for a currency pair. For example, to convert US Dollar to Canadian Dollar, you would use USDCAD. Other popular codes are GBP for the UK, INR for India, and EUR for Euros.

The stock data type can provide exchange rates. Start with currency pairs such as USDCAD for US Dollars to Canada dollars.
Figure 601. Cell A2 means from USD to CAD

Select the cells and declare them to be Stocks. Use =A2.Price to get the current exchange rate. Note that although most financial modelers will use three digits for their exchange rate, Excel starts out displaying only two digits. Use the Increase Decimal icon in the home tab to display more precision.

After converting to Stock, =A2Price gives you the current exchange rate.
Figure 602. The stock data type can return exchange rates.



This article is an excerpt from Power Excel With MrExcel

Title photo by Marga Santoso on Unsplash