cancel
Showing results for 
Search instead for 
Did you mean: 

Extract the text between two specified start and end strings in a field

former_member1110314
Participant
0 Kudos

Hi there

I need to extract the text from between two specific strings in a field.

For example, the field may look like this:

#Metalwork - Enamel#Cabinet 4 Shelf 2###This is the label text I want to extract.####

I want to extract the text between ### and ####; in other words, I want to extract "This is the label text I want to extract."

Can anyone advise the formula I need to do this? I've tried several options that I've found on forums, but so far none work.

cheers

Karen

Accepted Solutions (1)

Accepted Solutions (1)

ido_millet
Active Contributor
0 Kudos

Use the ExtractString function:

ExtractString(Yourfield, "###", "####")
Former Member
0 Kudos

Ido

You learn something new every day. Never used ExtractString() before, certainly much easier to use.

Ian

former_member1110314
Participant
0 Kudos

Awesome thanks! I agree, a very neat solution!

many thanks

Karen

Answers (1)

Answers (1)

Former Member
0 Kudos

You can use Instr() function

Instr(YourField, '###') will return character number of first #

Then use mid()

Mid(Yourfield, Instr(YourField, '###')+3, Instr(YourField, '####')-1)

Ian

former_member1110314
Participant
0 Kudos

Hi there Ian

Many thanks for your reply... I had just worked out how to do that when I saw your answer... then saw Ido had piped in with that ExtractString magic!

cheers for your awesome response anyway 🙂

Karen