+ Reply to Thread
Results 1 to 9 of 9

split it into firstname and lastname

  1. #1
    Registered User
    Join Date
    04-09-2013
    Location
    Bangalore
    MS-Off Ver
    Excel 2003
    Posts
    9

    split it into firstname and lastname

    i have data like FirstnameLastname

    JamesLee
    williamsmith

    where


    firstname is in black color
    and
    last name is in red color
    there is no space b/w first name and last name


    i want to split it into first name and last name
    only identity b/w first name and last name is color difference....


    please help

  2. #2
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: split it into firstname and lastname

    Post deleted due to violation of forum rules by the OP.
    Last edited by sktneer; 10-18-2014 at 08:06 AM.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  3. #3
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: split it into firstname and lastname

    Post deleted due to violation of forum rules by the OP.
    Last edited by sktneer; 10-18-2014 at 08:06 AM.

  4. #4
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: split it into firstname and lastname

    Post deleted due to violation of forum rules by the OP.
    Last edited by sktneer; 10-18-2014 at 08:05 AM.

  5. #5
    Registered User
    Join Date
    04-09-2013
    Location
    Bangalore
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: split it into firstname and lastname

    thank u very much but one small issue not major

    if i copy the module and run in new excel the result is coming like

    first name column is empty
    and
    last name column will return into data present in column "A" but not seperated but color is changed to black

    its working in the worksheet you have been provide very nicely but that code is not working in other worksheet

  6. #6
    Forum Expert
    Join Date
    10-10-2008
    Location
    Northeast Pennsylvania, USA
    MS-Off Ver
    Excel 2007
    Posts
    2,387

    Re: split it into firstname and lastname

    Cross Posted here:
    http://www.mrexcel.com/forum/excel-q...-identity.html

    A message to forum cross posters.

    Please read this:
    http://www.excelguru.ca/node/7
    Have a great day,
    Stan

    Windows 10, Excel 2007, on a PC.

    If you are satisfied with the solution(s) provided, please mark your thread as Solved by clicking EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

  7. #7
    Valued Forum Contributor Kamboj's Avatar
    Join Date
    09-25-2014
    Location
    India
    MS-Off Ver
    2003 - 2010
    Posts
    430

    Re: split it into firstname and lastname

    use this macro
    you can make any two colours difference



    n = 1
    bb = 1
    Do Until bb = 5
    b = Cells(bb, 1).Characters(n, 1).Font.Color

    Do Until n = Len(Range("A" & bb))

    c = Cells(bb, 1).Characters(n, 1).Font.Color
    If b <> c Then
    Range("B" & bb) = Mid(Range("A" & bb), 1, n - 1)
    Range("C" & bb) = Mid(Range("A" & bb), n, Len(Range("A" & bb)))
    bb = bb + 1
    n = 1
    Exit Do
    End If
    n = n + 1
    Loop
    Loop

  8. #8
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: split it into firstname and lastname

    @stanleydgromjr
    Thanks for pointing this out.

  9. #9
    Registered User
    Join Date
    04-09-2013
    Location
    Bangalore
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: split it into firstname and lastname

    thank u all

    sorry for it this is was my first post...

+ 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. Replies: 6
    Last Post: 11-13-2012, 06:45 PM
  2. splitting name into firstname and lastname
    By arunjoshi in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-21-2012, 04:13 AM
  3. Replies: 9
    Last Post: 04-18-2012, 06:27 PM
  4. Firstname, Lastname > Lastname Firstname
    By henrikb in forum Excel General
    Replies: 4
    Last Post: 06-22-2007, 04:59 AM
  5. [SOLVED] How to seperate lastname and firstname?
    By kai in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-02-2005, 11:05 PM

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