从GoogleFinance获取特定日期的汇率 [英] Get exchange rate on a specific date from GoogleFinance

查看:501
本文介绍了从GoogleFinance获取特定日期的汇率的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法在特定日期停止googlefinance功能,以使用that特定汇率将货币从GBP兑换为EUR。



这是我的公式: = Finance!B4 * GOOGLEFINANCE(CURRENCY:GBPEUR,price,date(2017,15,11))



以下是错误:在评估GOOGLEFINANCE时,符号:'CURRENCY:GBPEUR'的查询未返回任何数据。



我在SO上看过其他解决方案,但都无济于事。实际上,我在其他解决方案中添加了日期价格。像这样: - 解决方案1

解决方案

首先, date(2017,15,11)表示一年中第15个月的第11天,因此您需要交换月份和日期。其次,历史数据查询,如

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

return a表与列和标题。

 日期关闭
11/15/2017 23:58:00 1.1163

从你使用这个公式的方式来看,你看到的只是汇率。将函数包装在 index(...,2,2)中以获取第二行中的第二个单元格。

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


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 formulae: =Finance!B4*GOOGLEFINANCE("CURRENCY:GBPEUR","price",date(2017,15,11))

Here is the error: When evaluating GOOGLEFINANCE, the query for the symbol: 'CURRENCY:GBPEUR' returned no data.

I've looked at other solutions on SO but none to avail. I've actually added "date" and "price" to my formulae from other solutions. Like so:- Solution 1

解决方案

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)

这篇关于从GoogleFinance获取特定日期的汇率的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆