Excel Tip: Alphabetizing a Column of First and Last Names by Last Name
How many times have you entered a list of names, first and last name in the same column, like this:
and so on…
…only to find that you need to alphabetize the list by last name. Do you have to re-enter the entire list so that the last name appears first? Here's a quick method for sorting a list like the one above by last name.
The process involves separating the text into two columns, one for the first name and one for the last name. Once you have sorted all the columns by the last name column, you can remove the first name and last name columns so only the column with the combined names remains.
Assume the list of names (first and last names combined) resides in column A of your worksheet, beginning in row 1.
Step 1: In Row 1 of Column B, enter this formula including a space between the quotation marks:
Copy this formula through Column B for the length of the list in Column A (in other words, if the list in Column A goes to Row 20, you'll copy this formula down from Cell B1 through Cell B20).
Step 2: In Row 1 of Column C, enter this formula including a space between the quotation marks:
Copy this formula through Column C for the length of the list in Column A.
At this time you should see that the first names appear in Column B and the last names appear in Column C.
Step 3: Click once in any occupied cell in Column C. Click once on the Sort Ascending (A-Z) button on the Standard Toolbar. The entire group of names will be sorted by last name. (In lieu of using the Sort Ascending toolbar button, you may choose Data, Sort from the menu and make sure the Sort by field shows "Column C," then click the OK button.)
At this point, you may delete the information in columns B and C. Your list in Column A will be sorted by last name.
Voice of the Editor
Which isn’t completely true. I mean, occasionally I drop by when I manage to sneak out of the nonstop frat party over at Going Concern, but I’m mostly a wallflower over there. I’m happy to say that I’ve been given express permission (or explicit orders, if you like) to wander over here to AccountingWEB more often.
Why is that, you might ask? My job is to replace the irreplaceable Gail Perry as Editor-in-Chief. What does that mean? I don’t really know! I think it’ll be fun getting a feel for things, throwing in my own thoughts here and there, and listening to the discussions you’re having about the accounting profession.