Get exchange rate on a specific date from GoogleFinance

后端 未结 4 871
予麋鹿
予麋鹿 2021-02-19 11:15

I\'m having trouble stopping the googlefinance function on a specific date to use \"that\" specific exchange rate to convert currency from GBP to EUR.

Here is my formula

4条回答
  •  孤街浪徒
    2021-02-19 11:58

    First of all, date(2017,15,11) means the 11th day of 15th month of the year, so you'll need to swap the month and day.

    Secondly, historical data queries, such as

    =GOOGLEFINANCE("CURRENCY:GBPEUR", "price", date(2017,11,15))
    

    return a table with columns and headers.

    Date                Close
    11/15/2017 23:58:00 1.1163
    

    From the way you use this formula, I see you just want the exchange rate. Wrap the function in index(..., 2, 2) to get the second cell in second row.

    =index(GOOGLEFINANCE("CURRENCY:GBPEUR", "price", date(2017,11,15)), 2, 2)
    

提交回复
热议问题