2toria

asked on

# Return text between two characters

Hi Guys.

I'm hoping you can help me simplify my formula. In cell B10 I have a text string which has a format similar to this:-

Start_Middle_End

Where start and end are numbers and Middle is text. 'Start', 'Middle' and 'Length' are of variable length

What I need is a formula putting together which pulls out the text in 'Middle' no matter what the size of any of the parts. i've created this monster which does exactly what I want:-

=LEFT(SUBSTITUTE(B10,LEFT(B10,FIND("_",B10)),""),FIND("_",SUBSTITUTE(B10,LEFT(B10,FIND("_",B10)),""))-1)

...but I'm sure there's a simpler way to do it. Is there??

TIA,

Matt

I'm hoping you can help me simplify my formula. In cell B10 I have a text string which has a format similar to this:-

Start_Middle_End

Where start and end are numbers and Middle is text. 'Start', 'Middle' and 'Length' are of variable length

What I need is a formula putting together which pulls out the text in 'Middle' no matter what the size of any of the parts. i've created this monster which does exactly what I want:-

=LEFT(SUBSTITUTE(B10,LEFT(

...but I'm sure there's a simpler way to do it. Is there??

TIA,

Matt

SOLUTION

membership

Create an account to see this answer

Signing up is free. No credit card required.

SOLUTION

membership

Create an account to see this answer

Signing up is free. No credit card required.

ASKER CERTIFIED SOLUTION

membership

Create an account to see this answer

Signing up is free. No credit card required.

SOLUTION

membership

Create an account to see this answer

Signing up is free. No credit card required.