Removing commas and put first name first

%3CLINGO-SUB%20id%3D%22lingo-sub-1750643%22%20slang%3D%22en-US%22%3ERemoving%20commas%20and%20put%20first%20name%20first%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1750643%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20%40%2C%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20a%20list%20of%20names%20(last%20name%2C%20first%20name).%20I%20want%20(first%20name%20last%20name)%20Surely%20this%20can%20be%20done.%20Anyone%3F%3C%2FP%3E%3CP%3EThanks%20for%20the%20look%2C%3C%2FP%3E%3CP%3EKelly%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1750643%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAdmin%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1750689%22%20slang%3D%22de-DE%22%3ESubject%3A%20Removing%20commas%20and%20put%20first%20name%20first%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1750689%22%20slang%3D%22de-DE%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F822349%22%20target%3D%22_blank%22%3E%40KellyHunka%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWith%20your%20permission%2C%20if%20I%20can%20recommend.%20It%20can%20help%20us%20all%20if%20you%20upload%20an%20Excel%20file%20(without%20sensitive%20data)%2C%20no%20picture.%20So%20you%20could%20get%20a%20precise%20solution%20much%20faster.%20This%20would%20also%20be%20a%20blessing%20for%20us%2C%20as%20we%20can%20understand%20the%20problem%20much%20better%2C%20a%20win-win%20situation%20for%20everyone.%3C%2FP%3E%3CP%3E*%20Knowing%20the%20Excel%20version%20and%20operating%20system%20would%20be%20an%20advantage.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22tlid-translation%20translation%22%3ENot%20the%20less%20I%20would%20like%20to%20try%20to%20give%20you%20some%20information%20about%20the%20possible%20possibilities.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22tlid-translation%20translation%22%3E%3CSPAN%20class%3D%22%22%3EOne%20possibility%20could%20be%20VBA%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-applescript%22%3E%3CCODE%3EPrivate%20Sub%20Worksheet_Change(ByVal%20Target%20As%20Range)%0A%20%20%20%20If%20Target.Count%20%26gt%3B%201%20Or%20Target.Column%20%26lt%3B%26gt%3B%206%20Then%20Exit%20Sub%0A%20%20%20%20If%20InStr(Target%2C%20%22%2C%22)%20%26gt%3B%200%20Then%0A%20%20%20%20%20%20%20%20Application.EnableEvents%20%3D%20False%0A%20%20%20%20%20%20%20%20Target%20%3D%20Replace(Target%2C%20%22%2C%22%2C%20%22%22)%0A%20%20%20%20%20%20%20%20Application.EnableEvents%20%3D%20True%0A%20%20%20%20End%20If%0AEnd%20Sub%0A%0A'%20You%20just%20have%20to%20change%20the%20columns%20%2F%20cells%20according%20to%20your%20needs.%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22tlid-translation%20translation%22%3E%3CSPAN%20class%3D%22%22%3EA%20second%20possibility%20is%20to%20try%20a%20formula%2C%20here%20is%20an%20example%20(which%20you%20should%20also%20adapt)%3A%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22tlid-translation%20translation%22%3E%3CSPAN%20class%3D%22%22%3EHere's%20a%20simple%20formula%20that%20will%20get%20the%20job%20done%20correctly%3A%20%3D%20LEFT%20(NN%2C%20SEARCH%20(%22%22%2C%20NN)%20-%201)%20%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22tlid-translation%20translation%22%3E%3CSPAN%20class%3D%22%22%3Ewhere%20NN%20is%20the%20cell%20that%20stores%20the%20name.%3C%2FSPAN%3E%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22tlid-translation%20translation%22%3E%3CSPAN%3ET%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22tlid-translation%20translation%22%3E%3CSPAN%3Ehe%20-1%20is%20there%20to%20remove%20the%20extra%20space%20or%20comma%20at%20the%20end%20of%20the%20string.%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20for%20your%20understanding%20and%20patience%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20would%20be%20happy%20to%20know%20if%20I%20could%20help.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENikolino%3C%2FP%3E%3CP%3EI%20know%20I%20don't%20know%20anything%20(Socrates)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E*%20Kindly%20Mark%20and%20Vote%20this%20reply%20if%20it%20helps%20please%2C%20as%20it%20will%20be%20beneficial%20to%20more%20community%20members%20reading%20here.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Visitor

Hi @, 

I have a list of names (last name, first name). I want (first name last name) Surely this can be done. Anyone?

Thanks for the look,

Kelly

1 Reply
Highlighted

@KellyHunka 

 

With your permission, if I can recommend. It can help us all if you upload an Excel file (without sensitive data), no picture. So you could get a precise solution much faster. This would also be a blessing for us, as we can understand the problem much better, a win-win situation for everyone.

* Knowing the Excel version and operating system would also be an advantage.

 

Not the less I would like to try to give you some information about the possible possibilities.

One possibility could be VBA

 

Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Count > 1 Or Target.Column <> 6 Then Exit Sub
    If InStr(Target, ",") > 0 Then
        Application.EnableEvents = False
        Target = Replace(Target, ",", "")
        Application.EnableEvents = True
    End If
End Sub

' You just have to change the columns / cells according to your needs.

 

 

A second possibility is to try a formula, here is an example (which you should also adapt):

Here's a simple formula that will get the job done correctly: = LEFT (NN, SEARCH ("", NN) - 1) 

where NN is the cell that stores the name.

The -1 is there to remove the extra space or comma at the end of the string.

 

Thank you for your understanding and patience

 

I would be happy to know if I could help.

 

Nikolino

I know I don't know anything (Socrates)

 

* Kindly Mark and Vote this reply if it helps please, as it will be beneficial to more Community members reading here.