cancel
Showing results for 
Search instead for 
Did you mean: 

String MATCH functions in one variable

Former Member
0 Kudos

I am trying to rename some items to a smaller format to save report space in a table I am building.

I have a column with multiple values that have to much text I need to bring down.

Example, the column would contain

BMW Motorsports

Ferrari Motorsports

Mercedes Motorsports

I want them to display as

BMW

Ferrari

Mercedes

An example of my formula so far is

=If(Match([Competitor];"*BMW*");"BMW";0)

I would like to do something like this =If(Match([Competitor];"*BMW*");"BMW";0) Else If(Match([Competitor];"*Ferrari*");"Ferrari";0)

But this is not working, suggestions?

Accepted Solutions (1)

Accepted Solutions (1)

amitrathi239
Active Contributor
0 Kudos

If you want to extract the first word from the string then use this.

=Substr([Object];1;Pos([Object];" ")-1)

Former Member
0 Kudos

Hi Amit,

I am not looking to extract. I used those examples above since I can not share my real data due to company policies.

Another example would be

Nike Shoes

Nike Athletics

Nike Performance Golf

Callaway Golf

Callaway Shoes

I want them all to say Nike or Callaway

amitrathi239
Active Contributor
0 Kudos

use this.

=If(Match([String];"*Callaway*")) Then "Callaway" ElseIf(Match([String];"*Nike*")) Then "Nike" Else 0

Former Member
0 Kudos

Thanks Amit, I was close but you got me there! It works perfectly.

Answers (0)