Xxxxx-yyyyyyyy parse

All,
Thanks for your help.
What’s the best expression to return what’s left or right of the “-” delimiter?

0 3 957
3 REPLIES 3

Jonathon
Participant V

For left:
=LEFT([string], FIND("-",[string])-1)

For right:
=RIGHT([string],LEN([string])-FIND("-",[string]))

Thanks man, appreciate it.
Wasn’t sure if a split would be better…

Hadn’t considered split. Performance-wise, i’m not sure which is better… but the following split method looks cleaner and could handle strings with multiple delimiters:

First (or left) half of string:
INDEX(SPLIT([string],"-"),1)

Second (or right) half of string:
INDEX(SPLIT([string],"-"),2)

Top Labels in this Space