Thomas Smith
Thomas Smith

Reputation: 49

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.

Screenshot

Upvotes: 0

Views: 333

Answers (1)

player0
player0

Reputation: 1

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

0

Upvotes: 0

Related Questions