+ Reply to Thread
Results 1 to 7 of 7

VBA expression to extract the text from the beginning of an alphanumeric string

  1. #1
    Registered User
    Join Date
    07-11-2011
    Location
    Gatineau, QC
    MS-Off Ver
    Excel 2010
    Posts
    50

    VBA expression to extract the text from the beginning of an alphanumeric string

    Hello,

    I've edited to change my requirements.

    Does anyone know any vba code that could delete everything but alphabetic characters from a string? Basically, everything but A to Z should be deleted, including all numbers and special characters (!@#$%^&*()).

    Thank you.
    Last edited by webfeet2; 04-30-2012 at 08:17 PM.

  2. #2
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,525

    Re: VBA expression to extract the text from the beginning of an alphanumeric string

    Hi webfeet2,

    Do you only want to keep A to Z? What about a to z?

    Robert
    ____________________________________________
    Please ensure you mark your thread as Solved once it is. Click here to see how
    If this post helps, please don't forget to say thanks by clicking the star icon in the bottom left-hand corner of my post

  3. #3
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: VBA expression to extract the text from the beginning of an alphanumeric string

    Please Login or Register  to view this content.

  4. #4
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,525

    Re: VBA expression to extract the text from the beginning of an alphanumeric string

    Another way:

    Please Login or Register  to view this content.
    Regards,

    Robert

  5. #5
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: VBA expression to extract the text from the beginning of an alphanumeric string

    One more

    Please Login or Register  to view this content.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  6. #6
    Registered User
    Join Date
    07-11-2011
    Location
    Gatineau, QC
    MS-Off Ver
    Excel 2010
    Posts
    50

    Re: VBA expression to extract the text from the beginning of an alphanumeric string

    Hi Trebor,

    Thank you!! The code works very well, it was a big help.

  7. #7
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,525

    Re: VBA expression to extract the text from the beginning of an alphanumeric string

    Glad to have helped

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1