Get current Row number inside ArrayFormula

前端 未结 2 648
温柔的废话
温柔的废话 2021-02-12 05:55

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

=ARRAYFORMULA(ROW())

to fill the column like:

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


        
2条回答
  •  南方客
    南方客 (楼主)
    2021-02-12 06:33

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

    Try it this way:

    =ARRAYFORMULA(ROW(A1:A10))
    

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

提交回复
热议问题