How to flip the first and last name in cells in Excel?

Let's say you get a roster of names in one column, however, you need to flip the first name and late name in cells. Normally you will get into one cell and cut the last name, and then paste it before the first name, or retype the name again. It hears time-consuming and tedious. Actually, there are several easy ways to flip or reverse the first name and last name in a single column quickly.

Flip the first and last name in a column with a function

Flip the first and last name in a column with VBA

Flip the first and last name in a column with Kutools for Excel

Recommended Productivity Software

Office Tab: Use tabbed interface in Office as the use of web browser Chrome, Firefox and Internet Explorer.
Kutools for Excel: Adds 120 powerful new features to Excel. Increase your productivity in 5 minutes. Save two hours every day!
Classic Menu for Office: Brings back your familiar menus to Office 2007, 2010 and 2013 (includes Office 365).

Supposing you have a column of names, and you need to flip the first and last name, see following screenshots:

doc-flip-first-last-names1-2doc-flip-first-last-names2

arrow blue right bubble Flip the first and last name in a column with a function

Hint


We can use one of Excel's formulas to flip the first and last name quickly in a column with following steps:

Step 1: Enter the formula =MID(A1&" "&A1,FIND(" ",A1)+1,LEN(A1)) in a blank cell, says Cell C1. See screenshot:

doc-flip-first-last-names3

Step 2: Select the range of C1:C10, and click the Home > Fill > Down. Then you will see the first name are last name are inversed. See screenshot:

doc-flip-first-last-names4

Step 3: As they are formulas, when you need to copy them to other cells, please paste as values.


arrow blue right bubble Flip the first and last name in a column with VBA

You can also use VBA macros to flip the first and last name in a column quickly.

Step 1: Hold down the Alt + F11 keys in Excel, and it opens the Microsoft Visual Basic for Applications window.

Step 2: Click Insert > Module, and paste the following macro in the Modulewindow.

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

Step 3: Press the F5 key to run this macro. Then you will see a dialig display in the screen for you to select a range to flip, see screenshot:

Step 4: Press OK, then a dialog is popped up for you to define a invertal symbol, see creenshot:

Step 5: Press OK, you can see the result shown as below:


arrow blue right bubble Flip the first and last name in a column with Kutools for Excel

With Kutools for Excel’s Reverse Text Order, you can quickly reverse order of the text in the cells.

Kutools for Excel includes more than 120 handy Excel tools. Free to try with no limitation in 30 days. Get it Now.

If you have installed Kutools for Excel, please do as following steps:

Step 1: Select the range that you want to reverse the first and last names.

Step 2: Click Kutools > Text Tools > Reverse Text Order, see screenshot:

doc-flip-first-last-names5

Step 3: In the Reverse Text dialog box, specify a separator your text string using, in this example, select Space option, and you can see the results from the Preview Pane. See screenshot:

doc-flip-first-last-names6

Step 4: Then click OK or Apply, all of the first names and last names in the selected range have been reversed.

Note: Checking Skip non-text cells to prevent you reversing the numbers in selected range.

If you want to know more about this feature, please click Reverse Text Order.


Is your problem solved?

Recommended Productivity Tools

The following tools will greatly save your time and effort, which one do you prefer?
Office Tab: Using handy tabs in your Office, as the way of Chrome, Firefox and New Internet Explorer.
Kutools for Excel: 120 powerful new functions for Excel, Increase your productivity in 5 minutes. Save two hours every day!
Classic Menu for Office: Bring back familiar menus to Office 2007, 2010, 2013 and 365, as if it were Office 2000 and 2003.

Kutools for Excel

gold star1 Amazing! Increase your productivity in 5 minutes. Don't need any special skills, save two hours every day!

gold star1 More than 120 powerful advanced functions which designed for Excel:

  • Merge Cell/Rows/Columns without Losing Data.
  • Combine and Consolidate Multiple Sheets and Workbooks.
  • Compare Ranges, Copy Multiple Ranges, Convert Text to Date, Unit and Currency Conversion.
  • Count by Colors, Paging Subtotals, Advanced Sort and Super Filter,
  • More Select/Insert/Delete/Text/Format/Link/Comment/Workbooks/Worksheets Tools...

Screen shot of Kutools for Excel

btn read more     btn download     btn purchase