从 GetQuote 扩展返回的数组中选择单个列

发布于 2025-01-03 01:07:12 字数 458 浏览 3 评论 0原文

Ted Schlossmacher 的免费 OpenOffice.org Calc 的 GetQuote 扩展 允许用户访问所跟踪的多种符号类型的报价由雅虎!金融。具体来说,GETHISTORY() 函数返回一系列过去和现在的报价。

安装扩展程序后,尝试突出显示 5 列范围,然后键入 =GETHISTORY("PETR4.SA",1,TODAY()-1) (您可能需要使用分号而不是逗号)然后按Ctrl+Shift+Return。这应该为您提供巴西石油巨头 Petrobras SA 的优先股 PETR4 的日期、开盘价、最高价、最低价和收盘价

我的问题是:我如何在一个单元格中插入一个公式,该公式将返回我的价值上述数组的第 5 列?

Ted Schlossmacher's free GetQuote extension for OpenOffice.org Calc allows users to access quotes for several types of symbols tracked by Yahoo! Finance. Specifically, the GETHISTORY() function returns a range of past and present quotes.

After installing the extension, try highlighting a 5-column range and then typing =GETHISTORY("PETR4.SA",1,TODAY()-1) (you might need to use semicolons instead of commas) and then pressing Ctrl+Shift+Return. That should provide you with date, open, high, low and close quotes for PETR4, the preferred stock of Brazilian oil giant Petrobras S.A.

My question is: how can I, in one cell, insert a formula that would return me the value of the 5th column of the above array?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

戴着白色围巾的女孩 2025-01-10 01:07:12

这可以通过 INDEX 函数来完成。您不需要使用 ctrl+shift+enter 来使其工作,因为它不返回数组。

=INDEX(GETHISTORY("PETR4.SA",1,TODAY()-1),1,5)

2 个结束参数是 rowcolumn,并且是数组中从 1 开始的索引。

有关 INDEX 的更多信息可以在任何 Excel 网站上找到,或者在 LibreOffice Calc 帮助中找到,网址为 https://help.libreoffice.org/Calc/Spreadsheet_Functions#INDEX

This can be done with the INDEX function. You don't need to use ctrl+shift+enter for it to work as it does't return an array.

=INDEX(GETHISTORY("PETR4.SA",1,TODAY()-1),1,5)

The 2 end parameters are row,column, and are a 1-based index into the array.

More information about INDEX can be found on any Excel website, or in the LibreOffice Calc help at https://help.libreoffice.org/Calc/Spreadsheet_Functions#INDEX

清引 2025-01-10 01:07:12

可以使用第二个参数检索昨天的收盘价,例如:
=GETQUOTE("TD.TO",21)

从手册中:
GETQUOTE 可以获取 31 种类型的报价。类型编号为 0 到 30。该函数接受这些数字作为第二个参数。

 0 = Last traded price 
 1 = Change in price for the day 
 2 = Opening price of the day
 3 = High price of the day 
 4 = Low price of the day 
 5 = Volume 
 6 = Average Daily Volume 
 7 = Ask Price 
 8 = Bid Price 
 9 = Book Value 
10 = Dividend/Share 
11 = Earnings/Share 
12 = Earnings/Share Estimate Current Year 
13 = Earnings/Share Estimate Next Year 
14 = Earnings/Share Estimate Next Quarter 
15 = 52-week low
16 = Change from 52-week low
17 = 52-week high
18 = Change from 52-week high
19 = 50-day Moving Average
20 = 200-day Moving Average
21 = Previous Close
22 = Price/Earning Ratio
23 = Dividend Yield
24 = Price/Sales
25 = Price/Book
26 = PEG Ratio
27 = Price/EPS Estimate Current Year
28 = Price/EPS Estimate Next Year
29 = Short Ratio
30 = 1-year Target Price

Yesterday's closing price can be retrieved using a second argument, for example:
=GETQUOTE("TD.TO",21)

From the manual:
GETQUOTE can fetch 31 types of quotes. The types are numbered from 0 to 30. The function accepts these numbers as the second argument.

 0 = Last traded price 
 1 = Change in price for the day 
 2 = Opening price of the day
 3 = High price of the day 
 4 = Low price of the day 
 5 = Volume 
 6 = Average Daily Volume 
 7 = Ask Price 
 8 = Bid Price 
 9 = Book Value 
10 = Dividend/Share 
11 = Earnings/Share 
12 = Earnings/Share Estimate Current Year 
13 = Earnings/Share Estimate Next Year 
14 = Earnings/Share Estimate Next Quarter 
15 = 52-week low
16 = Change from 52-week low
17 = 52-week high
18 = Change from 52-week high
19 = 50-day Moving Average
20 = 200-day Moving Average
21 = Previous Close
22 = Price/Earning Ratio
23 = Dividend Yield
24 = Price/Sales
25 = Price/Book
26 = PEG Ratio
27 = Price/EPS Estimate Current Year
28 = Price/EPS Estimate Next Year
29 = Short Ratio
30 = 1-year Target Price
伤感在游骋 2025-01-10 01:07:12

如果您只需要最新价格(这是第五个字段),我相信您可以简单地使用:

=GETQUOTE("PETR4.SA")

我不确定这是否可以在市场开盘时返回当前价格,但它确实会在市场收盘时返回最后的交易价格。

If you need only the latest price (which is the fifth field) I believe you can simply use:

=GETQUOTE("PETR4.SA")

I'm not certain this works to return the current price when markets are open, but it does return the last trade price when markets are closed.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文