Results 1 to 4 of 4
  1. #1
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    GET part of string (2000)

    i have a var filled = 0900- xxxxxx (001) or filled 05680- xxxxxxxxxxx (011)...
    How to get only 0900- xxxxxx or 05680- xxxxxxxxxxx from the var?
    In effect i want to get all part of string without (xxx)...
    Note: the lenght of value nera (xxx) are variable but the suffix (xxx) have always the same lenght...

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: GET part of string (2000)

    Let's say the name of the variable is MyVar. To extract the part before the opening parenthesis ( you can use

    Left(MyVar, InStr(MyVar, "(") - 2)

  3. #3
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: GET part of string (2000)

    WOW!
    tKS.

  4. #4
    Lounger
    Join Date
    Sep 2008
    Posts
    49
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: GET part of string (2000)

    =Trim(Split(myVar,"(")(0))

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •