# A "begin" formula with OR statements to sort companies into groups by first letter

• 0
• Question
• Updated 2 years ago
• (Edited)
I am trying to create a formula to assign companies into groups based on their first letter automatically. I am unsure if I am using the correct formula. My current approach is
`If (Begins([Company Name],"a") OR Begins([Company Name],"b") OR Begins([Company Name],"c") OR Begins([Company Name],"d") = true, "A-D Clients",(Begins([Company Name],"e") OR Begins([Company Name],"f") OR Begins([Company Name],"g") OR Begins([Company Name],"h") OR Begins([Company Name],"i") OR Begins([Company Name],"j") OR Begins([Company Name],"k") = true, "E-K Clients",(Begins([Company Name],"l") OR Begins([Company Name],"m") OR Begins([Company Name],"n") OR Begins([Company Name],"o") = true, "L-O Clients",(Begins([Company Name],"p") OR Begins([Company Name],"q") OR Begins([Company Name],"r") = true, "P-R Clients",(Begins([Company Name],"s") OR Begins([Company Name],"t") = true, "S-T Clients",(Begins([Company Name],"u") OR Begins([Company Name],"v") OR Begins([Company Name],"w") OR Begins([Company Name],"x") OR Begins([Company Name],"y") OR Begins([Company Name],"z") = true, "U-Z Clients", False)`
Any thoughts on how I could get this working or a better approach?
• 1,644 Points

Posted 2 years ago

• 0

QuickBaseCoach App Dev./Training, Champion

• 67,760 Points
Try this
```If(
Begins([Company Name],"a")
OR Begins([Company Name],"b")
OR Begins([Company Name],"c")
OR Begins([Company Name],"d"), "A-D Clients",
Begins([Company Name],"e")
OR Begins([Company Name],"f")
OR Begins([Company Name],"g")
OR Begins([Company Name],"h")
OR Begins([Company Name],"i")
OR Begins([Company Name],"j")
OR Begins([Company Name],"k"), "E-K Clients",
Begins([Company Name],"l")
OR Begins([Company Name],"m")
OR Begins([Company Name],"n")
OR Begins([Company Name],"o"), "L-O Clients",
Begins([Company Name],"p")
OR Begins([Company Name],"q")
OR Begins([Company Name],"r"), "P-R Clients",
Begins([Company Name],"s")
OR Begins([Company Name],"t"), "S-T Clients",
```
Begins([Company Name],"u")
OR Begins([Company Name],"v")
OR Begins([Company Name],"w")
OR Begins([Company Name],"x")
OR Begins([Company Name],"y")
OR Begins([Company Name],"z"), "U-Z Clients")
• 1,644 Points
This did it!
Thank you!