# Google Sheets: convert currency to USD based on currency shown in cell

I use a Google Sheet to track ebook sales, some of which are international. Column `H` below has the royalty amount that was paid out for the sale, but that amount is still shown in the sale currency, as seen in Column `F`. I'd like to be able to convert the royalty amount to USD using a formula. I found one formula that comes close to what I want...it takes the money amount shown in a cell (e.g. `A2`) and converts it from one currency to another (GBP to USD in this case).

`=A2*GOOGLEFINANCE("CURRENCY:GBPUSD")`

However, this formula obviously requires you to enter both the base currency and the conversion currency, and I'd have to change it every time I needed to convert something besides GBP. Since I'll always be converting the sale currency to USD, is there a way to write a similar formula that takes the amount from Column `H`, looks at the currency listed in Column `F`, and converts that to USD?

• Finally. Good job. Commented Dec 19, 2020 at 1:53

``=IF(LEN(A2),IFERROR(D2*GOOGLEFINANCE("CURRENCY:"&B2&"USD"&""),D2),)``

Copy down till it meets your needs.

Functions used:

• Must be the fastest answer in webapps. LOL Commented Dec 19, 2020 at 1:58
• Haha! Thanks so much for your help!
– EJF
Commented Dec 19, 2020 at 2:00
• Glad I could help. Please remember that as per site guidelines when an answer addresses your question, accept it and even upvote it so others can benefit as well. Commented Dec 19, 2020 at 2:01
• Will do. Just waiting for the 5 minutes to be up so it actually lets me accept an answer :)
– EJF
Commented Dec 19, 2020 at 2:02
• Thanx. This was fun. Stay safe. Happy seasons. Commented Dec 19, 2020 at 2:03