+ Reply to Thread
Results 1 to 3 of 3

VB Code to split out Last Name, First Name

  1. #1
    Forum Contributor
    Join Date
    01-31-2012
    Location
    Georgia
    MS-Off Ver
    Excel 2010
    Posts
    193

    VB Code to split out Last Name, First Name

    Hello

    Please refer to attached file.
    I need VB Code to Split out Last Name, First Name and SS# as shown in Column D,E and F for source in column C


    Let me know if you have any questions.
    Thanks.
    Riz
    Attached Files Attached Files

  2. #2
    Forum Expert CheeseSandwich's Avatar
    Join Date
    12-22-2021
    Location
    Kent, England
    MS-Off Ver
    365 - 2402-17328.20068
    Posts
    1,360

    Re: VB Code to split out Last Name, First Name

    I would probably use the Split function as below:
    Please Login or Register  to view this content.
    Last edited by CheeseSandwich; 05-25-2022 at 02:18 AM.
    If things don't change they stay the same

  3. #3
    Forum Expert
    Join Date
    07-06-2004
    Location
    Northern California
    MS-Off Ver
    2K, 2003, 2010, O365
    Posts
    1,490

    Re: VB Code to split out Last Name, First Name

    If last name would always be the 1st set of nonblank characters, immediately followed by a comma, a space, the 1st name as the next set of nonblank characters, a space or newline, the 2 words Soc Sec#, space and ###-##-####, then for the VBA variable c set to cell C2,
    Please Login or Register  to view this content.
    This sets D2 to the last name, E2 to the 1st name and F2 to the Social Security number. Put that in a loop to generalize.

+ 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. split vba code line
    By Gerard FREDERIC in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-03-2022, 02:51 PM
  2. VB code to split data
    By rmomin in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-10-2021, 06:48 PM
  3. [SOLVED] Split before Zip Code
    By nordicdust in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 07-20-2020, 06:54 AM
  4. [SOLVED] Code to split
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-16-2016, 12:16 PM
  5. need vba code to split rows to closed wb shets depends company code met with sht name
    By julielara in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-18-2016, 12:44 PM
  6. 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
  7. how to convert excel split code to word split code
    By gsrikanth in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-02-2012, 07:56 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