You are here:

Excel/Removing initials from a cell

Advertisement


Question
QUESTION: Hi! I've a spreadsheet with 28,000 records and the names of clients are recorded, for example, as J A Smith or J Smith or J A C Smith in one single column. I've managed to remove all titles but am now stuck as I need to be able to order cells according to client surname. Is there any way I can either move the clients' initials to the end of the cell (after the surname) or dump the initials in a new adjacent cell? If this isn't possible then removing the initials  altogether from the cell is the next best option. Cheers!

ANSWER: I'd be inclined to use a helper column to pull the surname out instead - which you can then sort on.  IF you want to then replace the data you have you can copy and paste special values.

This formula should work

=RIGHT(A1,LEN(A1)-(LEN(A1)-LEN(SUBSTITUTE(A1," ","")))*2)

It assumes that you only have initials and they are all followed by a space .

IF that formula is in column B then
=LEFT(A1,LEN(A1)-LEN(B1))
would return the initials.

Hope this helps!

---------- FOLLOW-UP ----------

QUESTION: How do I set up a helper column to extract the surnames? Cheers!

Answer
Sorry, my fault - I explained that very badly.  By helper column I simply mean a blank column (usually to the right) of the existing data- I refer to these as helper columns as they help you but are outside the normal range of data on the spreadsheet - and indeed, if then using copy and paste special/values they once done, they cease to have a value, but they helped you to get to the state you needed.

I hope this is clearer, but do let me know if I can help further - if it helps, my direct email is aidan.heritage@virgin.net
About Excel
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here

Excel

All Answers


Answers by Expert:


Ask Experts

Volunteer


Aidan Heritage

Expertise

I have provided first hand support since `95 for Microsoft Office majoring in Word and Excel - support for all versions from 2 onwards. I'm based in the UK, so please allow for time differences when asking me questions from other parts of the world!

Experience

My background is in the insurance industry and call centre areas, but have been called upon to provide many varied solutions.

Education/Credentials
I'm educated to UK A level standard, but as I left school some 30 years ago that is rather irrelevent - university of life has provided more of a background!

©2016 About.com. All rights reserved.