You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Google Sheets公式问题:无法引用单元格日期获取比特币价格

Fixing CRYPTOFINANCE Date Reference in Google Sheets

The issue here is that the CRYPTOFINANCE function doesn’t natively accept an array of dates as its third parameter—when you pass $C$2:$C directly in your ARRAYFORMULA, it tries to send the entire range as a single value, which the function can’t interpret correctly.

Instead, use BYROW (a modern Google Sheets function) to iterate over each row individually, calling CRYPTOFINANCE with the corresponding date from column C for each non-blank entry in column B. Here’s the working formula:

=BYROW($B$2:$C, LAMBDA(row, IF(ISBLANK(INDEX(row, 1)), "", CRYPTOFINANCE("BTC/USD", "price", INDEX(row, 2)))))

How this works:

  • BYROW($B$2:$C, ...): Processes each row in the range B2:C one at a time.
  • LAMBDA(row, ...): Creates a custom function that takes each row as input.
  • INDEX(row, 1): Grabs the value from column B in the current row (to check if it’s blank).
  • INDEX(row, 2): Grabs the corresponding date from column C in the current row, passing it to CRYPTOFINANCE as a single, valid date value.

Pre-check to avoid issues:

Make sure column C is formatted as a Date (not plain text). To do this:

  • Select column C
  • Go to Format > Number > Date

This ensures Google Sheets recognizes the values as valid dates that CRYPTOFINANCE can process correctly.

内容的提问来源于stack exchange,提问作者Bocho Todorov

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.15 03:54:08