April 4, 200916 yr Hi, I have a text field that contains size and color data separated by a "-" dash. i.e. record (1) red - XL record (2): crystal blue - small record (3): black/light blue - large record (4): mediterranean blue/ speckled black (45) - extra small .. and so on I am looking to parse everything to the left and to the right of the "-" dash into two other fields (color) and (size). I am having trouble accounting for the variability of the location of the dash in building my calculation. Within this field, there is one and only one occurrence of the "-" dash. Any help pointing me in the right direction would be appreciated!
April 4, 200916 yr Try: Color = Left ( text ; Position ( text ; "-" ; 1 ; 1 ) - 1 ) Size = Right ( text ; Length ( text ) - Position ( text ; "-" ; 1 ; 1 ) ) If the dash is surrounded by spaces (as in your example), then adjust the formula or use Trim() on the result.
November 19, 200916 yr How about pulling the number after the first dash and before the second on this example: 09-[color:red]789-ROBB-5 In my limited knowledge I got this calculation but it doesnt account for the number in question being either 3 or 4 digits long. Middle (CaseNumber_pkid ; 4 ; 4)
Create an account or sign in to comment