String selection except last 6 digits

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • deanvilar
    New Member
    • Apr 2013
    • 82

    #1

    String selection except last 6 digits

    Hello Gurus ...

    txt = CS000001

    I selected a part of the string by
    Code:
    RIGHT (me.txt, 6)
    "returns 000001"... but what I really need is to take the strings before these 6 digits "CS" .... I cannot use
    Code:
    LEFT(me.txt, #)
    because the the letters before these 6 digits can be 1, 2, 3 or more letters .. for example CS000001, CSC000003, MBMMS000005, etc...

    thanks in advance ... =)
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    Code:
    Left(string, Len(string) - 6)

    Comment

    • deanvilar
      New Member
      • Apr 2013
      • 82

      #3
      thanks sir @Rabbit awesome!

      Comment

      Working...