+ Reply to Thread
Results 1 to 3 of 3

Split String and get the lenght of the alphanumerical part

  1. #1
    Forum Contributor
    Join Date
    03-02-2014
    Location
    usa
    MS-Off Ver
    Excel 2016
    Posts
    378

    Split String and get the lenght of the alphanumerical part

    Hello,
    My ActiveCell holds a string which always is made up of two parts:
    First part is made up of alphanumerical values.
    Second part is made up only by alphabetical values.
    Example1:
    01a 2 00 Shhkjk yiiy jgjgjg
    Or
    Example2:
    012.00 Shhkjooo k yiiy jgjgjg

    I need a VBA code which could return the length of the alphanumerical part (first part), which would be 8 in Example1 and 6 in Example2.

    Could you please advice?
    Thank you

  2. #2
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,904

    Re: Split String and get the lenght of the alphanumerical part

    Here is a formula solution for you

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    v A B
    1 01a 2 00 Shhkjk yiiy jgjgjg 8
    2 012.00 Shhkjooo k yiiy jgjgjg 6
    3 125 465 48 POIPONns 10
    4 2R 32aa 6547 POD_DDD 12
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  3. #3
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,350

    Re: Split String and get the lenght of the alphanumerical part

    Hi plans,
    maybe something like this
    Please Login or Register  to view this content.
    Last edited by nilem; 03-05-2016 at 02:08 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Lenght of String
    By Flaghacker in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-30-2014, 06:58 AM
  2. [SOLVED] Split Cells based on Character Lenght
    By steve_aztec in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-01-2013, 09:08 AM
  3. Extract largest number in an alphanumerical string
    By chitownsox14 in forum Excel General
    Replies: 16
    Last Post: 03-15-2011, 12:16 PM
  4. Maximum lenght for string? Or what's the issue?
    By tneva in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-27-2009, 04:03 AM
  5. split one column into two, according to the lenght of member
    By wali in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-03-2008, 03:32 AM
  6. Replies: 2
    Last Post: 08-26-2008, 04:03 AM
  7. [SOLVED] String parsing with variable lenght strings
    By frosterrj in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 03-31-2006, 06:50 PM

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