+ Reply to Thread
Results 1 to 5 of 5

Seperating first few variable length letters(alphas) from numerics

Hybrid View

KGromB Seperating first few variable... 03-24-2015, 02:46 PM
AstToTheRegionalMGR Re: Seperating first few... 03-24-2015, 03:03 PM
KGromB Re: Seperating first few... 03-24-2015, 03:36 PM
pjwhitfield Re: Seperating first few... 03-24-2015, 03:09 PM
KGromB Re: Seperating first few... 03-24-2015, 03:39 PM
  1. #1
    Registered User
    Join Date
    03-23-2015
    Location
    Nottingham
    MS-Off Ver
    2010
    Posts
    3

    Seperating first few variable length letters(alphas) from numerics

    Hi all,
    I have column A that contains mixed data, it could be several hundreds, thousands of rows.

    1 12345
    2 0943
    3 FT9876VT4
    4 BZZ3487
    5 CAAE345732
    6 YUV2456-56

    I would like to process this column so that in column B it would just have the first alphas (however many they are) ignoring any other alphas in the cell, for instance ignoring the VT in cell A3 ...

    1
    2
    3 FT
    4 BZZ
    5 CAAE
    6 YUV

    Column C would contain the first numeric after the first lot of alphas ...

    1 1
    2 0
    3 9
    4 3
    5 3
    6 4

    And column D would contain whatever is left after the first lot of alphas ...

    1 12345
    2 0943
    3 9876VT4
    4 3487
    5 345732
    6 2456-56

    I don't know if VB is required to do this or it can be done with formulas?
    Any help with this would be gratefully received by this newbiw.
    Thanks
    Kayma
    Last edited by KGromB; 03-24-2015 at 04:16 PM. Reason: Amended first table

  2. #2
    Forum Contributor
    Join Date
    11-12-2014
    Location
    Boston, MA
    MS-Off Ver
    Office 2010
    Posts
    172

    Re: Seperating first few variable length letters(alphas) from numerics

    Can you attach sample data? It's hard to understand what you mean without examples of the data

  3. #3
    Registered User
    Join Date
    03-23-2015
    Location
    Nottingham
    MS-Off Ver
    2010
    Posts
    3

    Re: Seperating first few variable length letters(alphas) from numerics

    Quote Originally Posted by AstToTheRegionalMGR View Post
    Can you attach sample data? It's hard to understand what you mean without examples of the data
    Apologies, I had a copy & paste breakdown, first table has now been corrected.

  4. #4
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: Seperating first few variable length letters(alphas) from numerics

    You could add the following VBA function and then use it in MID/LEFT/RIGHT functions to get the info you want
    Function FirstNumeric(inString)
    For x = 1 To Len(inString)
    If (IsNumeric(Mid(inString, x, 1))) Then
        FirstNumeric = x
        x = Len(inString)
    End If
    Next x
    End Function
    ie Column B would have the following formula:
    =IF(FirstNumeric(A1)<2,"",LEFT(A1,FirstNumeric(A1)-1))
    Column C
    =MID(A2,FirstNumeric(A2),1)
    Column D
    =IF(FirstNumeric(A2)<2,"",RIGHT(A2,LEN(A2)-FirstNumeric(A2)))
    If someone has helped you then please add to their Reputation

  5. #5
    Registered User
    Join Date
    03-23-2015
    Location
    Nottingham
    MS-Off Ver
    2010
    Posts
    3

    Re: Seperating first few variable length letters(alphas) from numerics

    pjwhitfield, This was really good given that I made a mess of the request
    Column B and C gave me exactly what I wanted, in column D I wanted the whole of the remainder after the first few alphas.

+ 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. Replies: 3
    Last Post: 11-21-2012, 03:28 PM
  2. Sum Variable Columns with 3 blank lines seperating each section
    By tgudex in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-25-2012, 10:44 AM
  3. LOOKUP to go from numerics to letters
    By phstol in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-08-2009, 01:46 PM
  4. code for seperating alpha numerics
    By saziz in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-26-2006, 05:51 PM
  5. [SOLVED] Seperating Numbers from Letters in Excel
    By Tel in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-23-2006, 07:40 PM

Tags for this Thread

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