+ Reply to Thread
Results 1 to 7 of 7

Split Columns (delimter multiple space)

Hybrid View

  1. #1
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: Split Columns (delimter multiple space)

    Try
    Sub test()
        Dim r As Range
        With CreateObject("VBScript.RegExp")
            .Global = True
            .Pattern = "\s{2,}"
            For Each r In Range("a1", Range("a" & Rows.Count).End(xlUp))
                r = .Replace(r, Chr(2))
            Next
        End With
        Columns("a").TextToColumns [a1], 1, other:=True, otherchar:=Chr(2)
    End Sub

  2. #2
    Registered User
    Join Date
    07-01-2020
    Location
    Yerevan
    MS-Off Ver
    2010
    Posts
    44

    Re: Split Columns (delimter multiple space)

    thank you this works perfectly

  3. #3
    Forum Guru
    Join Date
    04-23-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 365
    Posts
    2,463

    Re: Split Columns (delimter multiple space)

    Quote Originally Posted by lilit2222 View Post
    thank you this works perfectly
    We do not know whose post you are referring to. You should make that clear for future readers of this thread.

+ 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. [SOLVED] Split single column to multiple columns (using space as delimiter) - VBA code
    By niyidrums in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 06-15-2020, 03:58 PM
  2. [SOLVED] split numbers with space to multiple column
    By finalazy in forum Excel General
    Replies: 10
    Last Post: 08-26-2016, 10:13 AM
  3. [SOLVED] Split A List my Space in adjacent Columns
    By mtilbury in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-28-2015, 10:15 AM
  4. Replies: 4
    Last Post: 07-25-2013, 05:28 AM
  5. Macro to split Cells delimter comma to multiple Rows.
    By pavan5183 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-17-2013, 10:24 AM
  6. Text to columns, split at first space only
    By Wowbagger in forum Excel - New Users/Basics
    Replies: 6
    Last Post: 06-21-2012, 01:27 PM
  7. Replies: 1
    Last Post: 08-30-2005, 12:05 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