简体   繁体   中英

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.

The blocks could be 2 rows high or 30 rows high.

In Column AI have a number.

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.

在此处输入图片说明

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.

在此处输入图片说明

For example:

在此处输入图片说明

Formula in C2 and dragged down:

=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:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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