Help

Re: How to find text in text string

Solved
Jump to Solution
7051 4
cancel
Showing results for 
Search instead for 
Did you mean: 
ARTHUR_BENNETT
5 - Automation Enthusiast
5 - Automation Enthusiast

what formula can I run against a text field that will display all text characters up to a “,”.

Example: TEXT1, TEXT2

Result: TEXT1

1 Solution

Accepted Solutions
ARTHUR_BENNETT
5 - Automation Enthusiast
5 - Automation Enthusiast

How do I reformat this ?
Ashbaugh, Cally
to
Cally Ashbaugh

See Solution in Thread

32 Replies 32
Cameron_Deleone
6 - Interface Innovator
6 - Interface Innovator

Hi Arthur,

This should work:

LEFT({array field}, SEARCH(",", {array field})-1)

The LEFT function will display all characters up to some index, so you just use the SEARCH function to find the index of the comma, subtracting 1 if you don’t want to include it. It should return blank for a record with no comma.

Hope that helps!

ARTHUR_BENNETT
5 - Automation Enthusiast
5 - Automation Enthusiast

Thank you! Worked like a charm

ARTHUR_BENNETT
5 - Automation Enthusiast
5 - Automation Enthusiast

why does it apply a leading " - - example "Aby

The " appears if you have commas in a lookup field (which you do) or if you have multiple lines in a field.
To adapt the formula to remove the ", use MID instead:
MID({array field}, 1, SEARCH(",", {arrayfield})-2)

Thank you Andy!

_690x0

ARTHUR_BENNETT
5 - Automation Enthusiast
5 - Automation Enthusiast

How do I reformat this ?
Ashbaugh, Cally
to
Cally Ashbaugh

Assuming ‘Ashbaugh, Cally’ is in a field called {Name}, use this formula:

RIGHT(Name,LEN(Name)-FIND(' ',Name))&' '&LEFT(Name,FIND(',',Name)-1)

ARTHUR_BENNETT
5 - Automation Enthusiast
5 - Automation Enthusiast

Amazing! How do I learn to write these