在Google电子表格中,如何查询“GoogleFinance”以查看过去的汇率? [英] On Google Spreadsheet how can you query 'GoogleFinance' for a past exchange rate?

查看:346
本文介绍了在Google电子表格中,如何查询“GoogleFinance”以查看过去的汇率?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否可以在Google Spreadsheet上查询过去的汇率。 例如:

使用公式 = GoogleFinance(CURRENCY:USDEUR)将返回当前美元/欧元汇率。如何检索历史汇率?

解决方案

为了检索历史汇率,您必须使用以下公式: / p>

  = GoogleFinance(eurusd,price,today() -  1,today())

Where today() - 1,today()是所需的时间间隔,定义为静态日期对,或者隐式地定义为动态计算的值,如上例所示。该表达式将返回日期和关闭值的两列数组。关心合适的单元格格式(日期/数字)非常重要,否则您的数据将被打破。

如果您想要获得带有日期和时间的纯行没有列标题的货币兑换率,用 INDEX() 函数包装你的公式:

  = INDEX(GoogleFinance(eurusd,price,today() -  1,today()),2,)

仅检索汇率值,定义列号参数:

  = INDEX(GoogleFinance(eurusd,price,today() -  1,today()),2,2)

要从 Google财经 Google文件/电子表格中获得今日的汇率: $ p> = GoogleFinance(eurusd,price,today())

PS前段时间有一个简单的方法来获得今天的利率,但现在它的工作原理,你可以再次使用:

pre $ = GoogleFinance(currency:usdeur)

PS如何在Microsoft Excel中获得实时货币汇率:
$ b $ ul

  • https://superuser.com/a/687927/128312


  • I'd like to know if it is possible to query a past exchange rate on Google Spreadsheet.

    For example; using formula =GoogleFinance("CURRENCY:USDEUR") will return the USD/EUR rate at this present moment. How can you retrieve a historic rate?

    解决方案

    In order to retrieve the historical rate, you have to use the following formula:

    =GoogleFinance("eurusd","price",today()-1,today())
    

    Where today()-1, today() is the desired time interval, which can be explicitly defined as the static pair of dates, or implicitly, as the dynamically calculated values, like in the example above. This expression will return a two-column array of the dates and close values. It is important to care about the suitable cell format (date/number), otherwise your data will be broken.

    If you want to get the pure row with the date and currency exchange rate without column headers, wrap your formula with the INDEX() function:

    =INDEX(GoogleFinance("eurusd","price",today()-1,today()),2,)
    

    To retrieve the exchange rate value only, define the column number parameter:

    =INDEX(GoogleFinance("eurusd","price",today()-1,today()),2,2)
    

    To get today's currency exchange rates in Google Docs/Spreadsheet from Google Finance:

    =GoogleFinance("eurusd","price",today())
    

    P.S. Some time ago there was an issue with the short way to get today's rates, but now it works, and you can use again:

    =GoogleFinance("currency:usdeur")
    

    P.S. How to get live currency exchange rate in Microsoft Excel:

    这篇关于在Google电子表格中,如何查询“GoogleFinance”以查看过去的汇率?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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