Link to home
Create AccountLog in
Avatar of 2toria
2toriaFlag for United Kingdom of Great Britain and Northern Ireland

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
SOLUTION
Avatar of StephenJR
StephenJR
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
SOLUTION
Avatar of Ken Butters
Ken Butters
Flag of United States of America image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
ASKER CERTIFIED SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account