找到同一列/行中的第一个空单元格

时间:2021-06-28 10:04:13

I am trying to work out a formula that will give me the row number of the first empty cell in a column. Currently I am using:

我正在尝试计算一个公式,它将给出列中第一个空单元格的行号。目前我用:

=MATCH(TRUE, INDEX(ISBLANK(A:A), 0, 0), 0)

This works fine, unless the formula is put in the same column as the column I am searching in, in which case it does some sort of circular reference or something. Is there a formula I can use instead which will work when placed in the same column as it searches in?

这很好,除非公式与我搜索的列相同,在这种情况下,它会做一些循环引用之类的。是否有一个公式可以让我在搜索的时候使用?

1 个解决方案

#1


2  

Another way to do it

另一种方法

=MIN(IF(A2:A6="",ROW(A2:A6)))

you have to press CTRL+SHIFT+ENTER

你需要按CTRL+SHIFT+ENTER键

The difference is that this will give you the Row number of the first empty cell The previous answer will give the position (how many rows from the starting row) of the first empty cell... Both ways are valid depending on your needs

不同之处在于,这将给出第一个空单元格的行号,之前的答案将给出第一个空单元格的位置(从第一行到第一行有多少行)……根据您的需要,这两种方法都是有效的

#1


2  

Another way to do it

另一种方法

=MIN(IF(A2:A6="",ROW(A2:A6)))

you have to press CTRL+SHIFT+ENTER

你需要按CTRL+SHIFT+ENTER键

The difference is that this will give you the Row number of the first empty cell The previous answer will give the position (how many rows from the starting row) of the first empty cell... Both ways are valid depending on your needs

不同之处在于,这将给出第一个空单元格的行号,之前的答案将给出第一个空单元格的位置(从第一行到第一行有多少行)……根据您的需要,这两种方法都是有效的