Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: VBA or Code For split the data

  1. #11
    MrExcel MVP
    Moderator
    Peter_SSs's Avatar
    Join Date
    May 2005
    Location
    Macksville, Australia
    Posts
    40,969
    Post Thanks / Like
    Mentioned
    90 Post(s)
    Tagged
    21 Thread(s)

    Default Re: VBA or Code For split the data

    Another vba approach if the numbers are all 4-digit. Assumed starting in cell A2.

    Code:
    Sub Split_Numbers()
        Range("A2", Range("A" & Rows.Count).End(xlUp)).TextToColumns Range("B2"), xlFixedWidth, FieldInfo:=Array(Array(0, 1), Array(1, 1), Array(2, 1), Array(3, 1))
    End Sub
    Hope this helps, good luck.
    Peter
    Excel 365 - Windows 10
    - Want to help your helpers by posting a small, copyable, screen shot directly in your post? Look here
    - If posting vba code, please use Code Tags - like this [code]Paste code here[/code] - or use the # key in the Reply window
    - Read: Forum Rules, Forum Use Guidelines, & FAQ

  2. #12
    Board Regular
    Join Date
    Mar 2019
    Posts
    194
    Post Thanks / Like
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Default Re: VBA or Code For split the data

    Thanks Peter_SSs Sirji

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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