Skip to main content
Solved

Remove Characters after comma for string fields


Forum|alt.badge.img+3

Hello Airtable world,

I need help with a formula. I have a look up field with many options. All of these options share the same data for some field e.g. Pick Up Location.

In this case, I have 1 record with 2 options (lookup field) and the look up field extracts: Montreal, Montreal.

Is there a formula I can use to only keep what is before the first comma when working strings

This is an example of what I am trying to achieve

Thank you in advance

Matt

 

Best answer by TheTimeSavingCo

Hm, not sure what your data setup's like, but maybe you could look into using a rollup field with the formula `ARRAYUNIQUE(values)` as well

View original
Did this topic help you find an answer to your question?

4 replies

TheTimeSavingCo
Forum|alt.badge.img+28

Hm, not sure what your data setup's like, but maybe you could look into using a rollup field with the formula `ARRAYUNIQUE(values)` as well


Forum|alt.badge.img+18
  • Inspiring
  • 326 replies
  • December 9, 2022

Something along the lines (untested)...

IF(FIND(',',{field name}&''), 
LEFT(FIND(',',{field name}&'')-1,{field name}&''),
{field name}&''
)

 


Forum|alt.badge.img+3
augmented wrote:

Something along the lines (untested)...

IF(FIND(',',{field name}&''), 
LEFT(FIND(',',{field name}&'')-1,{field name}&''),
{field name}&''
)

 


well that works just fine, thanks a lot!


Forum|alt.badge.img+2
  • New Participant
  • 3 replies
  • November 19, 2024
augmented wrote:

Something along the lines (untested)...

IF(FIND(',',{field name}&''), 
LEFT(FIND(',',{field name}&'')-1,{field name}&''),
{field name}&''
)

 


Can you help me do the same for Los Angeles (hollywood)? I need to remove everything including and after the "(" in "(hollywood)"

So my goal is to make Los Angeles (hollywood) --> Los Angeles


Reply