+ Reply to Thread
Results 1 to 2 of 2

Separating text and numbers from a mixed code

Hybrid View

amahesh101 Separating text and numbers... 12-08-2010, 05:01 AM
pike Re: Separating text and... 12-10-2010, 03:42 AM
  1. #1
    Registered User
    Join Date
    02-22-2010
    Location
    London, england
    MS-Off Ver
    Excel 2007
    Posts
    2

    Post Separating text and numbers from a mixed code

    Hello,

    Need help to separate text and numbers from a alphanumeric code. the code could be in any order ( no first, no last, no in between etc).
    Did try available solutions but yet far off from desirable outcome.

    Ideally I was looking to get a formual based solution to the sample data enclosed here. I have been able to separate/solve part of it through text to col function but as it is, it will require an application of function everytime I have new data. A formula based solution could have helped permanently.

    Will be very thankful if some body could help

    regards
    Attached Files Attached Files

  2. #2
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,342

    Re: Separating text and numbers from a mixed code

    Hi amahesh101

    there is a pattern so you could run the text to column thrice
        Columns("A:A").Select
        Selection.TextToColumns Destination:=Range("B1"), DataType:=xlDelimited, _
            TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=False, _
            Semicolon:=False, Comma:=False, Space:=False, Other:=True, OtherChar _
            :="-", FieldInfo:=Array(Array(1, 1), Array(2, 1), Array(3, 1)), _
            TrailingMinusNumbers:=True
        Columns("D:D").Select
        Selection.TextToColumns Destination:=Range("F1"), DataType:=xlDelimited, _
            TextQualifier:=xlNone, ConsecutiveDelimiter:=False, Tab:=False, _
            Semicolon:=False, Comma:=False, Space:=True, Other:=False, OtherChar _
            :="-", FieldInfo:=Array(Array(1, 1), Array(2, 1), Array(3, 1), Array(4, 1)), _
            TrailingMinusNumbers:=True
        Columns("C:C").Select
        Selection.TextToColumns Destination:=Range("D1"), DataType:=xlDelimited, _
            TextQualifier:=xlNone, ConsecutiveDelimiter:=False, Tab:=False, _
            Semicolon:=False, Comma:=False, Space:=False, Other:=True, OtherChar _
            :=".", FieldInfo:=Array(Array(1, 1), Array(2, 1)), TrailingMinusNumbers:=True
    If the solution helped please donate to RSPCA

    Site worth visiting: Rabbitohs

+ 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