简体   繁体   English

Excel:A列中的最小值,而B列不为空

[英]Excel: Lowest value in column A while Column B is not blank

In Column BI have the word "setup" which appears in sporadic blocks going down the column.在列 BI 中有“设置”这个词,它出现在沿着列向下的零星块中。

The blocks could be 2 rows high or 30 rows high.块可以是 2 行高或 30 行高。

In Column AI have a number.在列 AI 中有一个数字。

In Column CI would like to pick out the lowest number from Column A while Column B is not empty and place it at the top of each block.在列中,CI 想从 A 列中挑选出最小的数字,而 B 列不为空,并将其放置在每个块的顶部。

在此处输入图片说明

Can anybody help please?有人可以帮忙吗?

You can try following formula:您可以尝试以下公式:

=IFERROR(IFERROR(MIN(INDEX(A:A,AGGREGATE(14,6,(1/($B$1:B2=""))*ROW($B$1:B2),1)+1,1):INDEX(A:A,AGGREGATE(15,6,(1/(B2:$B$100000=""))*ROW(B2:$B$100000),1)-1,1))/(B2<>""),"")/(B1=""),"")

Replace $B$100000 with last used cell.用上次使用的电池替换$B$100000

在此处输入图片说明

For example:例如:

在此处输入图片说明

Formula in C2 and dragged down: C2公式并下拉:

=IF(AND(B2="setup",B2<>B1),INDEX(A:A,MATCH(TRUE,ISBLANK(B2:B$1048576),0)+ROW(A1)-1),"")

With Excel O365, you could use:使用 Excel O365,您可以使用:

=IF(AND(B4="setup",B4<>B3),XLOOKUP(TRUE,ISBLANK(B2:B$1048576),A1:A$1048575,,0),"")

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM