在该行的第一个非空白单元格之后,如何计算空白行 [英] How to count blanks in a row, after first Non Blank cell of that Row

查看:112
本文介绍了在该行的第一个非空白单元格之后,如何计算空白行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

例如,我有一个范围"B3:AY3" ,并且第一个包含值的非空白单元格为"R3" ,我需要对所有空白进行计数单元格"R3"之后的单元格

For instance i have a range "B3:AY3" and first non blank cell that contains value is "R3", i need to count all blank cells after cell "R3"

推荐答案

此公式必须输入数组:

A3:= COUNTBLANK(OFFSET(MyRange,0,MATCH( TRUE,LEN(MyRange)> 0,0)-1,1,COLUMNS( MyRange)-MATCH(TRUE,LEN(MyRange)> 0,0)+1))

A3: =COUNTBLANK(OFFSET(MyRange,0,MATCH( TRUE,LEN(MyRange)>0,0)-1,1,COLUMNS( MyRange)-MATCH(TRUE,LEN(MyRange)>0,0)+1))

其中MyRange = B3:AY3

where MyRange = B3:AY3

并根据需要填写

数组输入公式 将公式放到单元格或公式栏中,按住 按下输入 Ctrl移.如果你这样做 正确地,Excel会将括号{...}放在公式周围.

To array-enter a formula, after entering the formula into the cell or formula bar, hold down ctrl-shift while hitting enter. If you did this correctly, Excel will place braces {...} around the formula.

如果该范围内只有空白单元格,或者该范围内有任何包含错误的单元格,则上述公式将返回错误消息.如果出现问题,请改用以下输入数组公式:

The above formula will return an error message if there are ONLY blank cells in the range, or if there are any cells in the range which contain an error. If that is a problem, use the following array-entered formula instead:

=IFERROR(COUNTBLANK(OFFSET(MyRange,0,MATCH(
TRUE,IFERROR(LEN(MyRange)>0,TRUE),0)-1,1,COLUMNS(
MyRange)-MATCH(TRUE,IFERROR(LEN(MyRange)>0,TRUE),0)+1)),COLUMNS(MyRange))

IT会将错误视为非空白,如果所有单元格均为空白,则将所有单元格计数.

IT will count errors as being non-blanks, and count all the cells if all are blank.

这篇关于在该行的第一个非空白单元格之后,如何计算空白行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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