user20333600
user20333600

Reputation:

Create an arrayformula that find word

I'm trying to find a formula with arrayformula that will search a specific word on many columns and report an anwser. So in my exemple below, if a row show need order, it will tell need order in the arrayformula column and if not it will show ok.

=arrayformula Column B Column C
need order $ 20 need order
ok $ 60 $100$

I've tried to used the formula below wiht arrayformula but couldn't find a way to make it work.

=IF(COUNTIF(B2:C3,"need order")>0,"need order","ok")

I'm open to all suggestion Cheers

Upvotes: 0

Views: 53

Answers (1)

JvdV
JvdV

Reputation: 75920

Assuming GS, try something along the lines of:

=BYROW(FILTER(B:C,B:B<>""),LAMBDA(a,IF(COUNTIF(a,"need order"),"need order","ok")))

In case of headers, try:

=BYROW(FILTER(B2:C,B2:B<>""),LAMBDA(a,IF(COUNTIF(a,"need order"),"need order","ok")))

Upvotes: 1

Related Questions