• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 912
  • Last Modified:

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
0
BearWebContent
Asked:
BearWebContent
1 Solution
 
BearWebContentAuthor Commented:
Never mind. I figured it out. "-" being whatever point you want to end at.

=MID([Col1],1,FIND("-",[Col1],1)-1)
0
 
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

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now