获取 Google 表格列中的最后一个非空单元格 [英] Get the last non-empty cell in a column in Google Sheets

查看:18
本文介绍了获取 Google 表格列中的最后一个非空单元格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用以下函数

=DAYS360(A2, A35)

计算我的专栏中两个日期之间的差异.但是,该列一直在扩展,我目前必须在更新电子表格时手动更改A35".

to calculate the difference between two dates in my column. However, the column is ever expanding and I currently have to manually change 'A35' as I update my spreadsheet.

有没有办法(在 Google 表格中)找到该列中的最后一个非空单元格,然后在上述函数中动态设置该参数?

Is there a way (in Google Sheets) to find the last non-empty cell in this column and then dynamically set that parameter in the above function?

推荐答案

可能有更雄辩的方法,但这是我想出的方法:

There may be a more eloquent way, but this is the way I came up with:

查找列中最后一个填充单元格的函数是:

The function to find the last populated cell in a column is:

=INDEX( FILTER( A:A ; NOT( ISBLANK( A:A ) ) ) ; ROWS( FILTER( A:A ; NOT( ISBLANK( A:A ) ) ) ) )

所以如果你把它和你当前的函数结合起来,它会是这样的:

So if you combine it with your current function it would look like this:

=DAYS360(A2,INDEX( FILTER( A:A ; NOT( ISBLANK( A:A ) ) ) ; ROWS( FILTER( A:A ; NOT( ISBLANK( A:A ) ) ) ) ))

这篇关于获取 Google 表格列中的最后一个非空单元格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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