简体   繁体   中英

Using a Vlookup formula within an Arrayformula

I'm using the following formula to search a column for "Yes" and it works fine in the cell:

=VLOOKUP("Yes",INDEX(AH:AH,ROW()):INDEX(AI:AI,ROW()+30),2,FALSE)

However, my sheet is over 20000 rows and added to every day so I need to Arrayformula it. The following hasn't worked. I only want the range to search the next 30 rows OR return column two the next time it finds "Yes" in column one.

=arrayformula(IF($A4:$A<>"",VLOOKUP("Yes",INDEX(AH:AH,ROW()):INDEX(AI:AI,ROW()+30),2,FALSE),0))

Appreciate any help.

EDIT:

Below is an image of the spreadsheet. In column AK is the first formula, just a simple Vlookup. As you can see it searches column AH for the next value "Yes" and returns the value in the cell next to it.

Column AM is the same formula wrapped in an Arrayformula but as you can see it is not working.

屏幕截图

=ARRAYFORMULA(IF(LEN(A:A), IF(B1:B="yes", C1:C, ), ))

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