Assaf
Assaf

Reputation: 89

Formula to get the Nth substring between a seperator

I have this Image Path on Cell A1: E:\Test\Coll\01\Red\Example\Untitled-1.jpg BEFORE

I want cells B2 to whatever it takes (in my case H2) to show the Nth substring between the separator "\", meaning: AFTER

I know the Data to Columns does the exact same thing, but i need it to be dynamic.

Any ideas please?

Upvotes: 0

Views: 47

Answers (1)

chris neilsen
chris neilsen

Reputation: 53137

Formula for B2

=TRIM(MID(SUBSTITUTE($A2,"\",REPT(" ",100)),(B$1-1)*100+1,100))

Copy accross as far as needed

Upvotes: 2

Related Questions