Sharepoint Calculated Field - extract piece of text from another field

I have a field with a value at the before a "-" that varies in length and text after the dash. I would like to get a sub set of the portion before the dash. I've seen comments on how to extract after a certain point but not before and not if the length varies.

Sample:

OLB-20           in original field

OLB                should be in calculated field

OLBad-1539   in original field

OLBad            should be in calculated field
BearWebContentAsked:
Who is Participating?
 
EE_AutoDeleterCommented:
Because this question has no expert participation and is over 21 days old, it would have been deleted automatically, but you have posted information yourself making this PAQ-worthy.

EE_AutoDeleter
0
 
BearWebContentAuthor Commented:
Never mind. I figured it out. "-" being whatever point you want to end at.

=MID([Col1],1,FIND("-",[Col1],1)-1)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.