获取ArrayFormula中的当前行号 [英] Get current Row number inside ArrayFormula

查看:52
本文介绍了获取ArrayFormula中的当前行号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Google文档电子表格中,我希望使用以下公式:

In a Google Docs Spreadsheet, I would expect this formula:

=ARRAYFORMULA(ROW())

以填充列,如:

[   1]
[   2]
[   3]
[   4]
  ...

但是它停在1.这是怎么回事?还有另一种方法来获取arrayformula中的当前行号吗?

but instead it stops at 1. What is happening here? Is there another way to get the current row number in an arrayformula?

推荐答案

您需要为ROW()指定一个单元格范围参数,以便具有多个值.

You need to specify a cell-range argument for ROW() in order to have more than one value.

以这种方式尝试:

=ARRAYFORMULA(ROW(A1:A10))

这将用1至10的行号填充一列.

This will fill a column with row numbers from 1 to 10.

这篇关于获取ArrayFormula中的当前行号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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