+ Reply to Thread
Results 1 to 6 of 6

Split name and bachelor

Hybrid View

  1. #1
    Forum Expert
    Join Date
    11-28-2015
    Location
    indo
    MS-Off Ver
    2016 64 bitt
    Posts
    1,513

    Split name and bachelor

    I have data in A1:A5
    Like this
    Prof.Marchel,M,si
    Iwano,M,Phil
    Alonso,ST
    Ir.soekarno
    Drs.nanan karno,M.sc
    I want separate name and bachelor
    For example
    B1 = Prof ,C1= Marchel,D1= M,Si
    B2 = ,C2=iwano,D2=M,Phil
    B3 = ,C3 =Alonso,D3 =ST
    B4 =Ir ,C4 = Soekarno,D3 =
    B5 = Drs,C5 = Nanan Karno,D5=M.sc
    Thank for your help

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

    Re: Split name and bachelor

    Sub test()
        Dim r As Range
        With CreateObject("VBScript.RegExp")
            .Pattern = "^((.*?)\. *)?([^,]+),?( *(.+))?"
            For Each r In Range("a1", Range("a" & Rows.Count).End(xlUp))
                If .test(r.Value) Then r(, 2).Resize(, 3).Value = Split(.Replace(r.Value, "$2^$3^$5"), "^")
            Next
        End With
    End Sub

  3. #3
    Forum Expert
    Join Date
    11-28-2015
    Location
    indo
    MS-Off Ver
    2016 64 bitt
    Posts
    1,513

    Re: Split name and bachelor

    Thankyou.jindon
    "Presh Star Who has help you *For Add Reputation!! And mark case as Solve"

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

    Re: Split name and bachelor

    If that takes care of your original question, select Thread Tools from the menu link above and mark this thread as SOLVED.

  5. #5
    Forum Expert
    Join Date
    11-28-2015
    Location
    indo
    MS-Off Ver
    2016 64 bitt
    Posts
    1,513

    Re: Split name and bachelor

    Jindon if in A6 = jindon,M.Si
    In c6 = jindon,m d6 = Si
    I want in c6 = Jindon and d6 = M.Si

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

    Re: Split name and bachelor

    You need to upload a workbook with the data and the result that you want.

+ 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. Need Macro code to split data split in 7 sheets based on variable rows in column A
    By Alija_21 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-31-2015, 08:03 AM
  2. [SOLVED] create macro to split screen and then in top split, go to a certain cell
    By ammartino44 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-17-2015, 05:45 PM
  3. Split cell to create sorted heading on empty row above and keep second split info
    By CastingDirector in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-09-2015, 12:24 AM
  4. [SOLVED] Split Array, Listing Marked Items in Split Arrays
    By lesoies in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-27-2013, 02:07 AM
  5. [SOLVED] Split Macro modification to Split into new Workbooks instead of sheets within one workbook
    By DLSmith in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-13-2012, 08:11 PM
  6. Can excels Split() function split a string up at multiple spots?
    By 111StepsAhead in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-14-2011, 02:36 PM
  7. [SOLVED] Bachelor cooking Xmas dinner !
    By Graham B. in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 12-31-2005, 10:36 AM

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