Home > front end >  Create an arrayformula that find word
Create an arrayformula that find word

Time:01-18

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

CodePudding user response:

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")))
  • Related