Wednesday, 8 February 2023

Create a currency converter in Google Sheets

 There's no need to create fancy python programs for converting currencies when you can connect to google finance through a simple formula.  In the below example we are using the British Pound (GBP) as  the user input to covert to US Dollars, Japanese Yen (JPY), Euro (EUR), India Ruppees (IND) and the Canadian Dollar (CAD).  The currency converts roughly every 15 minutes as it syncs with Google finance data.



In column A the user inputs the currency value, so in colums B through F we need to enter the currency converter formula. A sample of this can be shown here =Googlefinance("Currency:GBPUSD")*A2

To break this down in column B we have entered the fomula to convert the user input of the British Pound which converts the cell data into US Dollars. So A2 is where the data is coming from and calculating it automatically into B2. In C2 for the Japanese conversion use formula

=Googlefinance("Currency:GBPJPY")*A2

A list of the currecies are below

GBP - British Pound

USD - US Dollars

Japanese Yen - JPY

Euro - EUR

Indian Rupees - INR

Canadian Dollar - CAD


If you wish to change the format of your currencies simply replace the formula with what currency you want to convert from to for example =Googlefinance("Currency:USDJPY")*A2 would convert the user input of USD to Japanese Yen. You could lay out your spreadsheet vertically rather than horizontally just remember where the user input is to be placed and ammend your formula with the cells accordindly.
Happy spreadsheeting!

No comments:

Post a Comment

Fast switching vs Process switching

Process Switching: Process switching is the traditional method of packet forwarding used in early routers. When a packet arrives at a router...