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.
 
Back
Top