Note: The other languages of the website are Google-translated. Back to English
Inloggen  \/ 
x
or
x
Registreer  \/ 
x

or

Hoe de voor- en achternaam in cellen in Excel omdraaien?

Stel dat u een lijst met namen in één kolom krijgt, maar u moet de voornaam en achternaam in cellen omdraaien. Normaal gesproken kom je in één cel en knip je de achternaam, en plak je deze voor de voornaam, of typ je de naam opnieuw. Het zal tijdrovend en vervelend zijn als u deze traditionele methoden gebruikt. In feite zijn er verschillende eenvoudige manieren om de voor- en achternaam in een enkele kolom snel om te draaien of om te keren. Stel dat je een kolom met namen hebt en je moet de voor- en achternaam omdraaien, zoals hieronder wordt getoond:
doc flip voor achternaam 1

Draai de voor- en achternaam om in een kolom met een functie

Draai de voor- en achternaam in een kolom met VBA om

Draai de voor- en achternaam in een kolom om met Kutools voor Excelgoed idee 3

Splits de volledige naam in voornaam en achternaam met Kutools voor Excelgoed idee 3


Draai de voor- en achternaam om in een kolom met een functie

We kunnen een van de formules van Excel gebruiken om de voor- en achternaam snel in een kolom om te draaien met de volgende stappen:

 Voer de formule in =MID(A2&" "&A2,FIND(" ",A2)+1,LEN(A2)) in een lege cel, zegt cel C2. En sleep vervolgens de vulgreep naar de cellen om deze formule toe te passen, dan kun je zien dat alle voor- en achternaam zijn vereerd. Zie screenshot:

doc flip voor achternaam 2


Draai de voor- en achternaam in een kolom met VBA om

U kunt ook VBA-macro's gebruiken om de voor- en achternaam in een kolom snel om te draaien.

1. Houd de toets ingedrukt Alt + F11 toetsen in Excel, en het opent het Microsoft Visual Basic voor toepassingen venster.

2.  Klik Invoegen > Moduleen plak de volgende macro in het Module venster.

Sub FlipName()
'Updateby20131126
Dim Rng As Range
Dim WorkRng As Range
Dim Sign As String
On Error Resume Next
xTitleId = "KutoolsforExcel"
Set WorkRng = Application.Selection
Set WorkRng = Application.InputBox("Range", xTitleId, WorkRng.Address, Type:=8)
Sign = Application.InputBox("Symbol interval", xTitleId, " ", Type:=2)
For Each Rng In WorkRng
    xValue = Rng.Value
    NameList = VBA.Split(xValue, Sign)
    If UBound(NameList) = 1 Then
        Rng.Value = NameList(1) + Sign + NameList(0)
    End If
Next
End Sub

3. druk de F5 toets om deze macro uit te voeren. Bij het opduiken KutoolsforExcel dialoogvenster, selecteer het bereik dat u wilt omdraaien en klik vervolgens op het OK knop. Zie screenshot:

doc flip voor achternaam 3

4. Voer in het volgende pop-upvenster een intervalteken in (zoals een spatie) en klik vervolgens op het OK knop. Zie screenshot:

doc flip voor achternaam 4

5. Nu worden de voor- en achternaam in het geselecteerde bereik omgedraaid. Zie screenshot:

doc flip voor achternaam 5


Draai de voor- en achternaam in een kolom om met Kutools voor Excel

met Kutools for Excel's Reverse Text Orderkunt u de volgorde van de tekst in de cellen snel omkeren.

Kutools for Excel: Een handige invoegtoepassing voor Excel, maakt uw taken eenvoudiger en efficiënter.
  • 300+ krachtige en gemakkelijk te gebruiken functies,110,000+ De keuze van Excel-gebruikers
  • full-featured gratis proefperiode van 30 dagen, geen kredietkaart nodig
  • tientallen one-click-functies om uw werktijd voor het oplossen van complexe problemen te verkorten
  • bevat functies voor batch-conversie, verwijderen, combineren van bladen / cellen, exproting, ect, nu gratis proberen.

Na het installeren van Kutools voor Excel, doe het als volgt:(Download nu Kutools voor Excel!)

1.  Selecteer het bereik waarvan u de voor- en achternaam wilt omdraaien.

2.  Klik Kutools > Text > Reverse Text Order, zie screenshot:

doc flip voor achternaam 8

3. In de Reverse Text dialoogvenster, specificeer een scheidingsteken voor uw geselecteerde tekstreeks met, (in dit geval selecteer ik Space optie) en klik vervolgens op het OK knop. En alle voor- en achternamen in het geselecteerde bereik zijn omgekeerd. Zie screenshot:

doc flip voor achternaam 7

Opmerking:: Controleren Skip non-text cellen om te voorkomen dat u de getallen in het geselecteerde bereik omkeert.


Demo: draai / keer de voor- en achternaam in cellen om


Splits de volledige naam in voornaam en achternaam met Kutools voor Excel

Na het installeren van Kutools voor Excel, doe het als volgt:(Download nu Kutools voor Excel!)

Als u een lijst met volledige namen hebt die afzonderlijk in twee kolommen moeten worden opgesplitst in voornaam en achternaam, zoals onderstaand screenshot, kunt u Kutools voor Excel toepassen Split Names om het snel af te handelen.
doc flip voor achternaam 9

1. Selecteer de lijst met namen die u wilt splitsen, klik op Kutools > Merge & Split > Split Names.
doc flip voor achternaam 10

2. In de Split Names dialoogvenster, vink aan First name als Last name selectievakjes, als u de middelste naam ook wilt splitsen, vink dan aan Middle name. Klikken Ok, selecteer een cel om de gesplitste namen te plaatsen.
doc flip voor achternaam 11



Kutools for Excel: 300+ functies die u in Excel moet hebben, 30 dagen gratis proefperiode vanaf hier.


De beste tools voor kantoorproductiviteit

Kutools voor Excel lost de meeste van uw problemen op en verhoogt uw productiviteit met 80%

  • visfuik: Snel invoegen complexe formules, grafieken en alles wat je eerder hebt gebruikt; Versleutel cellen met wachtwoord; Maak een mailinglijst en stuur e-mails ...
  • Super Formula-balk (bewerk eenvoudig meerdere regels tekst en formule); Lay-out lezen (gemakkelijk grote aantallen cellen lezen en bewerken); Plakken in gefilterd bereik...
  • Voeg cellen / rijen / kolommen samen zonder gegevens te verliezen; Gespleten cellen inhoud; Combineer dubbele rijen / kolommen... Voorkom dubbele cellen; Vergelijk Ranges...
  • Selecteer Dupliceren of Uniek Rijen; Selecteer lege rijen (alle cellen zijn leeg); Super zoeken en fuzzy zoeken in veel werkboeken; Willekeurige selectie ...
  • Exacte kopie Meerdere cellen zonder de formuleverwijzing te wijzigen; Maak automatisch verwijzingen naar meerdere bladen; Plaats kogels, Selectievakjes en meer ...
  • Extraheer tekst, Tekst toevoegen, Verwijderen op positie, Ruimte verwijderen; Paging-subtotalen maken en afdrukken; Converteren tussen celinhoud en opmerkingen...
  • Super filter (bewaar en pas filterschema's toe op andere bladen); Geavanceerd sorteren per maand / week / dag, frequentie en meer; Speciaal filter door vet, cursief ...
  • Combineer werkmappen en werkbladen; Tabellen samenvoegen op basis van sleutelkolommen; Gegevens splitsen in meerdere bladen; Batch Converteer xls, xlsx en PDF...
  • Meer dan 300 krachtige functies. Ondersteunt Office / Excel 2007-2019 en 365. Ondersteunt alle talen. Eenvoudig te implementeren in uw onderneming of organisatie. Gratis proefperiode van 30 dagen met volledige functies. 60 dagen geld-terug-garantie.
kte tabblad 201905

Office-tabblad Brengt een interface met tabbladen naar Office en maakt uw werk veel gemakkelijker

  • Schakel bewerken en lezen met tabbladen in Word, Excel, PowerPoint in, Publisher, Access, Visio en Project.
  • Open en maak meerdere documenten in nieuwe tabbladen van hetzelfde venster in plaats van in nieuwe vensters.
  • Verhoogt uw productiviteit met 50% en vermindert elke dag honderden muisklikken voor u!
officetab onderkant
Say something here...
symbols left.
You are guest
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    Evelyn · 1 years ago
    Thank you sooo very much! You made work easier for me!
  • To post as a guest, your comment is unpublished.
    mribbon9 · 2 years ago
    =MID(A2&", "&A2,FIND(" ",A2)+1,LEN(A2)+1)

    where the name is on the A2 cell
    • To post as a guest, your comment is unpublished.
      Mary · 1 years ago
      You saved my life!!! Thank you. None of the others worked. This is exactly what I needed.
  • To post as a guest, your comment is unpublished.
    mribbon9 · 2 years ago
    =MID(O4&", "&O4,FIND(" ",O4)+1,LEN(O4)+1)
  • To post as a guest, your comment is unpublished.
    Mike · 2 years ago
    okay. can someone say this in english because I have no clue what you guys are talking about
  • To post as a guest, your comment is unpublished.
    John · 3 years ago
    Try this to add a comma: =MID(A2&", "&A2,FIND(" ",A2)+1,LEN(A2)+1)
    • To post as a guest, your comment is unpublished.
      savvy · 10 months ago
      THANK YOU literally I've been trying to figure out the comma thing for like an hour. Thank you!
  • To post as a guest, your comment is unpublished.
    Jill · 3 years ago
    What if I need to insert a comma between the last and first name?
  • To post as a guest, your comment is unpublished.
    Ted · 4 years ago
    What if there is a comma separating the 2 names? Is there a way to eliminate it? Now the names look like

    Arthur Lange,

    Eric Norris,

    etc etc

    • To post as a guest, your comment is unpublished.
      Guest · 2 years ago
      Try this to remove a comma: =MID(A2&" "&A2,FIND(", ",A2)+1,LEN(A2)+1)
    • To post as a guest, your comment is unpublished.
      Kody · 4 years ago
      Have you tried Ctrl+F, Select Replace, Find "," and leave replace with blank.
      • To post as a guest, your comment is unpublished.
        Brittany · 3 years ago
        When I try that, it pops up with this error message "There's a problem with this formula. Not trying to type a formula? When the first character is an equal (=) or minus (-) sign, Excel thinks it's a formula: you type: =1+1, cell shows: 2. To get around this, type an apostrophe (') first: you type: '=1+1, cell shows =1+1.
        • To post as a guest, your comment is unpublished.
          Ric · 3 years ago
          I think you are changing the formula. Try copying and pasting the values to a new cell then do the find/replace.
    • To post as a guest, your comment is unpublished.
      Kaity · 4 years ago
      I want to know this too!
  • To post as a guest, your comment is unpublished.
    Danny · 4 years ago
    Correction. What if i have four names? What's the formula?
    Last name - first name - middle1 - middle2
  • To post as a guest, your comment is unpublished.
    Danny · 4 years ago
    If you have middle name how do you flip the last name? Example below.
    Last name - first name - middle name
    • To post as a guest, your comment is unpublished.
      Arev · 4 years ago
      Instead of +1, change the plus factor to two numbers greater than the middle name. This has worked for me.

      Arev
  • To post as a guest, your comment is unpublished.
    Mary · 5 years ago
    THANKS!!!!! This formula just saved me a bunch of time. I am sure I will use it again and again.
  • To post as a guest, your comment is unpublished.
    Jam Smith · 5 years ago
    Please help I need a formula to flip Alexa Victoria G. Garcia to Garcia, Alexa Victoria G.

    Please help :) Thank you
  • To post as a guest, your comment is unpublished.
    Dr. Demento · 6 years ago
    A suggestion - In an effort to encourage good programming practices (Option Explicit), please dim all variables.
  • To post as a guest, your comment is unpublished.
    Raj · 6 years ago
    I would like excel updates
  • To post as a guest, your comment is unpublished.
    Sureshkumar · 6 years ago
    Hello,

    How to reverse the name in the format Lastname,Firstname to Firstname Lastname

    Lets say Paul,John = John Paul
    • To post as a guest, your comment is unpublished.
      Mike Gagne · 6 years ago
      Switching around the last, first is actually a little easier because we have that comma to help us. Assume that the name is in cell A1 and the formula used is:

      TRIM(RIGHT(A1,LEN($A1)-FIND(",",A1,1)))&" "&TRIM(LEFT(A1,FIND(",",A1,1)-1))

      I put the TRIM command on both the first and last names to ensure that we are only going to have the single space between the two. Probably doesn't need the TRIM on the last name, but you never know if a space may be the first character of the cell or if there may be a space preceding the comma.
  • To post as a guest, your comment is unpublished.
    Lea Carol Glennon · 7 years ago
    The first formula worked fine (once I got rid of the middle names). But now I want to alphabetize and it won't do it.......because there's a formula in the cells?
    • To post as a guest, your comment is unpublished.
      heyliddle · 7 years ago
      So there's a long, drawn out way that you can change the format of Lastname, Firstname Middle to Firstname Middlename Lastname.

      Assume that Lastname, Firstname Middle is in Cell A1.

      Highlight the cell/column that Lastname, Firstname Middlename(s) is in. Click Data tab->Text to Columns. Chose "Delimited" Next-> click all that apply in checklist and double click the line between Firstname and Secondname to remove it, Next-> Finish. Now Lastname is still in A1, and Firstname Middlename in B2.

      In a new cell (let's say C1) use the forumla =Concatenate(B1," ",A1) and the name will now read as " Firstname Middlename Lastname" (note the space at the start).

      I another cell (let's say D1) use =TRIM(C1) to remove the space.

      And you're done! I'm sure there is a much easier process, but that's what works for me.

      Cheers!
  • To post as a guest, your comment is unpublished.
    Sciguy · 7 years ago
    Thanks - worked well and saved me a lot of time!
  • To post as a guest, your comment is unpublished.
    DiGi · 7 years ago
    The Macro worked for me. Thanks!
  • To post as a guest, your comment is unpublished.
    vivek · 7 years ago
    I want 20140115 to 15012014
  • To post as a guest, your comment is unpublished.
    CJC · 7 years ago
    I understand what each part of the formula does (MID, FIND, and LEN), but I don't understand why it's actually flipping the names. Can someone please explain that to me?
    • To post as a guest, your comment is unpublished.
      Mike Gagne · 7 years ago
      Sadly, the original formula doesn't work correctly if the name includes a middle initial or middle name. So, "Jim R Green" gets you "R Green Jim" when you really want "Green Jim R".

      The formula to allow for that to happen is:
      =MID(A1&" "&A1,IF(LEN(A1)-LEN(SUBSTITUTE(A1," ",""))=1,FIND(" ",A1)+1,FIND(" ",A1,FIND(" ",A1)+1)+1),LEN(A1))

      What I've done with the original formula is just add a test to see if the original name contains more than 1 space and if so, begin my mid function with the second space. Note that it's still not perfect because it doesn't take into account "Jr.", "Sr." or "III", etc. being after the last name, but it's better.

      An additional thing to keep in mind is if your data isn't 100% clean and contains leading or trailing spaces, like "Jim R Green ", you'll need to use the TRIM command to clean it up. If you don't, it will throw off the count of spaces and give you a "#value!" error. Use this to ensure no leading or trailing spaces affect your results:

      =MID(TRIM(A1)&" "&TRIM(A1),IF(LEN(TRIM(A1))-LEN(SUBSTITUTE(TRIM(A1)," ",""))=1,FIND(" ",TRIM(A1))+1,FIND(" ",TRIM(A1),FIND(" ",TRIM(A1))+1)+1),LEN(TRIM(A1)))

      You can also alter the formula to include the comma between the last and first names, as in "Green, Jim R", by using this:

      =MID(TRIM(A1)&", "&TRIM(A1),IF(LEN(TRIM(A1))-LEN(SUBSTITUTE(TRIM(A1)," ",""))=1,FIND(" ",TRIM(A1))+1,FIND(" ",TRIM(A1),FIND(" ",TRIM(A1))+1)+1),LEN(TRIM(A1))+1)

      Hope that helps out some!
      • To post as a guest, your comment is unpublished.
        William · 4 years ago
        [quote name="Mike Gagne"]Sadly, the original formula doesn't work correctly if the name includes a middle initial or middle name. So, "Jim R Green" gets you "R Green Jim" when you really want "Green Jim R".

        The formula to allow for that to happen is:
        =MID(A1&" "&A1,IF(LEN(A1)-LEN(SUBSTITUTE(A1," ",""))=1,FIND(" ",A1)+1,FIND(" ",A1,FIND(" ",A1)+1)+1),LEN(A1))

        What I've done with the original formula is just add a test to see if the original name contains more than 1 space and if so, begin my mid function with the second space. Note that it's still not perfect because it doesn't take into account "Jr.", "Sr." or "III", etc. being after the last name, but it's better.

        An additional thing to keep in mind is if your data isn't 100% clean and contains leading or trailing spaces, like "Jim R Green ", you'll need to use the TRIM command to clean it up. If you don't, it will throw off the count of spaces and give you a "#value!" error. Use this to ensure no leading or trailing spaces affect your results:

        =MID(TRIM(A1)&" "&TRIM(A1),IF(LEN(TRIM(A1))-LEN(SUBSTITUTE(TRIM(A1)," ",""))=1,FIND(" ",TRIM(A1))+1,FIND(" ",TRIM(A1),FIND(" ",TRIM(A1))+1)+1),LEN(TRIM(A1)))

        You can also alter the formula to include the comma between the last and first names, as in "Green, Jim R", by using this:

        =MID(TRIM(A1)&", "&TRIM(A1),IF(LEN(TRIM(A1))-LEN(SUBSTITUTE(TRIM(A1)," ",""))=1,FIND(" ",TRIM(A1))+1,FIND(" ",TRIM(A1),FIND(" ",TRIM(A1))+1)+1),LEN(TRIM(A1))+1)

        Hope that helps out some![/quote]

        can you help me with this problem?

        the original
        14D-E13111-00
        and i want it to be
        E13111-14D-00

        Thank you so very much...
      • To post as a guest, your comment is unpublished.
        Prashant Kulkarni · 6 years ago
        Thanks Mike Gagne its helps me lot. i have big data base of full name i have to sort it by last name first. its give me very big help on that work. thank you again.
        :lol:
      • To post as a guest, your comment is unpublished.
        Joel · 7 years ago
        Please help

        What if multiple First name or surname

        Example

        Nick Van Exel
        should appear as VanExel, Nick

        Luis Alfred D. Chua
        should appear as Chua, Luis D.
        Chua, Alfred D.

        Jason D. Lee-Parks
        should appear as LeeParks, Jason D.
      • To post as a guest, your comment is unpublished.
        JS · 7 years ago
        While the original formula doesn't work for multiple first names or first name + middle name initials (the aforementioned Jim R. Green, or Lee Harvey Oswald, for example), it does work correctly for multi-part surnames, e.g. James Van Der Beek -> Van Der Beek James. If you have one or two instances of people with both multiple first names or middle names combined with a multi-part surname, you're probably best off handling those manually. Or trimming away the extra middle names, or saving the first names and last names in separate columns to begin with, then hiding those columns and combining them however you want for display.
        • To post as a guest, your comment is unpublished.
          Mike Gagne · 7 years ago
          That's a really good catch JS, one example that I hadn't thought of testing.

          There is another work around that could be done to help with this issue and that is to use a non-breaking space to separate multi-part last names. You may have seen &NBSP used in HTML code. You can insert a non-breaking space into your cell by holding the ALT key and typing the numbers "0160" using the keypad.

          I tried it and it works great.
    • To post as a guest, your comment is unpublished.
      Mike Gagne · 7 years ago
      [quote name="CJC"]I understand what each part of the formula does (MID, FIND, and LEN), but I don't understand why it's actually flipping the names. Can someone please explain that to me?[/quote]

      Here's the formula being used:
      MID(A1&" "&A1,FIND(" ",A1)+1,LEN(A1))

      The Mid function has these components:
      Mid("text to use", where to start, num of chars to select)

      It works by taking the contents of A1 and putting two copies of it together separated by a space (i.e. A1&" "&A1 = "Jim Green Jim Green".)

      The next step then skips the first word (i.e. Find(" ", A1)+1 = "Jim ", so in net effect leaves you with "Green Jim Green" to work with.)

      The final step selects the length of the orginal string (i.e. Len("Jim Green") = 9) from the remaining portion of the concatenated string less the first name (i.e. "Green Jim Green")

      Hopefully that makes sense.
  • To post as a guest, your comment is unpublished.
    Raymond · 7 years ago
    The first formula works perfectly.
  • To post as a guest, your comment is unpublished.
    Stacy · 7 years ago
    None of this Works, except for what this person is selling