# Help with arrayformula

**URL:** https://community.glideapps.com/t/help-with-arrayformula/13946
**Category:** Ask for Help
**Created:** [August 13, 2020, 3:36pm UTC](https://community.glideapps.com/t/help-with-arrayformula/13946 "2020-08-13T15:36:18Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![S\_C](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/s_c/32/12766_2.png) [@S\_C](https://community.glideapps.com/u/S_C)
#### Post date: [August 13, 2020, 3:36pm UTC](https://community.glideapps.com/t/help-with-arrayformula/13946/1 "2020-08-13T15:36:18Z")

</div>

Hello everyone,

I need some help with arrayformula. I am creating an arrayformula in row 1 which will create a “management” label if it detects title of CEO, Manager, etc.

This is how far I’ve reached:  
={“Header”;ArrayFormula(IF(SEARCH(“CEO”,T2:T)\>0,“Management”,))}

I have not been able to add ISBLANK or make the criteria search for multiple words at a time. Is it possible to search multiple keywords? In multiple columns? If yes, how.

Thanks for your time and help.

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [August 13, 2020, 5:22pm UTC](https://community.glideapps.com/t/help-with-arrayformula/13946/2 "2020-08-13T17:22:58Z")

</div>

I believe an arrayformula combined with array of words will work but let me check when I get up and get back to you.

---

<div class="post-metadata">

### Author: ![S\_C](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/s_c/32/12766_2.png) [@S\_C](https://community.glideapps.com/u/S_C)
#### Post date: [August 13, 2020, 5:30pm UTC](https://community.glideapps.com/t/help-with-arrayformula/13946/3 "2020-08-13T17:30:41Z")

</div>

={“Header”;ArrayFormula(IF(B2:B\<\>"",(IF(SEARCH(“CEO”,V2:V)\>0,“MANAGEMENT”,)),))}

As always, Thanks for responding @ThinhDinh. I figured most of it out- Instead of ISBLANK I used nested IF and combined multiple columns using concatenate. Haven’t figured out multiple keywords (For example, “CEO” OR “MANAGER”) in one search.

Please let me know if you have a suggestion/ you see an issue.

---

<div class="post-metadata">

### Author: ![Coupons\_Deal](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/coupons_deal/32/9734_2.png) [@Coupons\_Deal](https://community.glideapps.com/u/Coupons_Deal)
#### Post date: [August 13, 2020, 5:32pm UTC](https://community.glideapps.com/t/help-with-arrayformula/13946/4 "2020-08-13T17:32:15Z")

</div>

How many Roles do you have in Management Category and Non-Management Category?

---

<div class="post-metadata">

### Author: ![S\_C](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/s_c/32/12766_2.png) [@S\_C](https://community.glideapps.com/u/S_C)
#### Post date: [August 13, 2020, 5:36pm UTC](https://community.glideapps.com/t/help-with-arrayformula/13946/5 "2020-08-13T17:36:07Z")

</div>

Thanks Arun. There is no limit for management category. Non-management is not defined/part of criteria.

---

<div class="post-metadata">

### Author: ![sardamit](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/sardamit/32/263_2.png) [@sardamit](https://community.glideapps.com/u/sardamit)
#### Post date: [August 13, 2020, 5:39pm UTC](https://community.glideapps.com/t/help-with-arrayformula/13946/6 "2020-08-13T17:39:51Z")

</div>

Sumit,  
Use REGEXMATCH.

An arrayformula works on REGEXTRACT and I no reason to believe that it will not work on REGEXMATCH.  
I am pasting the formula as is from one of my projects.

```
=ARRAYFORMULA(IF(ROW(A:A)=1,"Model",IF(A:A="","",IF(F:F="",IFERROR(REGEXEXTRACT(UPPER(F:F)&" "&UPPER(G:G),UPPER(Control!$G$1))),UPPER(F:F)))))

```

I think Control!$G$1 contains a string of keywords that you want to match.

---

<div class="post-metadata">

### Author: ![S\_C](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/s_c/32/12766_2.png) [@S\_C](https://community.glideapps.com/u/S_C)
#### Post date: [August 13, 2020, 5:46pm UTC](https://community.glideapps.com/t/help-with-arrayformula/13946/7 "2020-08-13T17:46:45Z")

</div>

Thanks Amit.  
I tried REGEXMATCH but there was some issue at the time (I forget 😐). May be it was the criteria I was using at the time or it was leading to TRUE/ FALSE value only. Will try again.  
Will REGEXMATCH be better than what I am using right now?

---

<div class="post-metadata">

### Author: ![Coupons\_Deal](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/coupons_deal/32/9734_2.png) [@Coupons\_Deal](https://community.glideapps.com/u/Coupons_Deal)
#### Post date: [August 13, 2020, 5:46pm UTC](https://community.glideapps.com/t/help-with-arrayformula/13946/8 "2020-08-13T17:46:55Z")

</div>

={“Roles”;ArrayFormula(if(ArrayFormula(–regexmatch(K2:K, “CEO|Manager”)),“Management”, “”))}

![Screenshot 2020-08-13 at 9.48.43 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/d/dd519056508e04d9b2fa3b079818c877b38d1b6d.png)

---

<div class="post-metadata">

### Author: ![S\_C](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/s_c/32/12766_2.png) [@S\_C](https://community.glideapps.com/u/S_C)
#### Post date: [August 13, 2020, 5:53pm UTC](https://community.glideapps.com/t/help-with-arrayformula/13946/9 "2020-08-13T17:53:03Z")

</div>

Arun, Its giving me a parsing error.

---

<div class="post-metadata">

### Author: ![Coupons\_Deal](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/coupons_deal/32/9734_2.png) [@Coupons\_Deal](https://community.glideapps.com/u/Coupons_Deal)
#### Post date: [August 13, 2020, 5:58pm UTC](https://community.glideapps.com/t/help-with-arrayformula/13946/10 "2020-08-13T17:58:45Z")

</div>

Delete " and add from your keyboard and also before regex there are 2 hypen (- -)

---

<div class="post-metadata">

### Author: ![S\_C](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/s_c/32/12766_2.png) [@S\_C](https://community.glideapps.com/u/S_C)
#### Post date: [August 13, 2020, 6:09pm UTC](https://community.glideapps.com/t/help-with-arrayformula/13946/11 "2020-08-13T18:09:09Z")

</div>

Can I make detection case insensitive / lower case irrespective of the original text.

---

<div class="post-metadata">

### Author: ![sardamit](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/sardamit/32/263_2.png) [@sardamit](https://community.glideapps.com/u/sardamit)
#### Post date: [August 13, 2020, 6:21pm UTC](https://community.glideapps.com/t/help-with-arrayformula/13946/12 "2020-08-13T18:21:42Z")

</div>

Just wrap around both strings with LOWER().

---

<div class="post-metadata">

### Author: ![S\_C](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/s_c/32/12766_2.png) [@S\_C](https://community.glideapps.com/u/S_C)
#### Post date: [August 13, 2020, 6:24pm UTC](https://community.glideapps.com/t/help-with-arrayformula/13946/13 "2020-08-13T18:24:30Z")

</div>

Thanks Thin, Amit, and Arun. You guys are awesome!

---

<div class="post-metadata">

### Author: ![adelhammoud](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/adelhammoud/32/5587_2.png) [@adelhammoud](https://community.glideapps.com/u/adelhammoud)
#### Post date: [August 13, 2020, 6:25pm UTC](https://community.glideapps.com/t/help-with-arrayformula/13946/14 "2020-08-13T18:25:14Z")

</div>

> [@Coupons\_Deal](#):
>
> regexmatch(K2:K, “CEO|Manager

Try this as well

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/1/113b68396f5b3fd9cf1536a9e83fd3f8a7e3ea9c.png)

B2 Cell

=arrayformula(if(A2:A\<\>“”,if(regexmatch(A2:A,“CEO|Manager|Director”),“Management”,“”),“”))
