substring function

  • Thread starter Thread starter Bre-x
  • Start date Start date
B

Bre-x

Hi
From this text "N:\1CNCACCESSAPPS\UMW\525\CASSTE0100"

how do I extract: "CASSTE0100" or what ever is to the left of
"N:\1CNCACCESSAPPS\UMW\525\"

the number of character on "N:\1CNCACCESSAPPS\UMW\525\" is always constant

Thanks you All!!!!
 
Hi
From this text "N:\1CNCACCESSAPPS\UMW\525\CASSTE0100"

how do I extract: "CASSTE0100" or what ever is to the left of
"N:\1CNCACCESSAPPS\UMW\525\"

the number of character on "N:\1CNCACCESSAPPS\UMW\525\" is always constant

Thanks you All!!!!

Your message is confusing as "CASSTE0100" is to the right of
"N:\1CNCACCESSAPPS\UMW\525\" not to the left.
What portion of the full string do you wish to keep?

If you wish the "N:\1CNCACCESSAPPS\UMW\525" part?

=Left("N:\1CNCACCESSAPPS\UMW\525\CASSTE0100",
InStrRev("N:\1CNCACCESSAPPS\UMW\525\CASSTE0100","\")-1)

If you wish the "CASSTE0100" part?

=Mid("N:\1CNCACCESSAPPS\UMW\525\CASSTE0100",
InStrRev("N:\1CNCACCESSAPPS\UMW\525\CASSTE0100","\")+1)

It doesn't matter, using the above functions, whether or not the
actual string length varies.
 
Thanks!!!


fredg said:
Your message is confusing as "CASSTE0100" is to the right of
"N:\1CNCACCESSAPPS\UMW\525\" not to the left.
What portion of the full string do you wish to keep?

If you wish the "N:\1CNCACCESSAPPS\UMW\525" part?

=Left("N:\1CNCACCESSAPPS\UMW\525\CASSTE0100",
InStrRev("N:\1CNCACCESSAPPS\UMW\525\CASSTE0100","\")-1)

If you wish the "CASSTE0100" part?

=Mid("N:\1CNCACCESSAPPS\UMW\525\CASSTE0100",
InStrRev("N:\1CNCACCESSAPPS\UMW\525\CASSTE0100","\")+1)

It doesn't matter, using the above functions, whether or not the
actual string length varies.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Talking to Excel 16
Assigning Value to a Range of Numbers 1
Date/Time on X axis 3
VLOOKUP 1
Excel Newbie...How To Re-Order Data 5
MIN function 4
Help with function / Formula 3
WPF-style code 1

Back
Top