Get exchange rate on a specific date from GoogleFinance

后端 未结 4 868
予麋鹿
予麋鹿 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 12:02

    your issue is (was) that you trying to force data for non-existing 15th month. syntax for DATE is:

    =DATE(YEAR(), MONTH(), DAY())
    

    so the full formula should be:

    =Finance!B4*INDEX(GOOGLEFINANCE("CURRENCY:GBPEUR", "price", DATE(2017, 11, 15)), 2, 2)
    

    alternatives are:

    =Finance!B4*INDEX(GOOGLEFINANCE("CURRENCY:GBPEUR", "price", "15/11/2014"), 2, 2)
    

    =Finance!B4*INDEX(GOOGLEFINANCE("CURRENCY:GBPEUR", "price", DATEVALUE("15/11/2014")), 2, 2)
    

    =Finance!B4*INDEX(GOOGLEFINANCE("CURRENCY:GBPEUR", "price", A1), 2, 2)
    

    where A1 contains valid date

提交回复
热议问题