splitting text in cells
The UK's Number 1 for Microsoft Office Training Add this page to your favourites/bookmarksBookmark page
 
View printable version of pagePrintable version
Plus One Google
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum home » Delegate support and help forum » Microsoft Excel Training and help » Splitting Text In Cells

Splitting Text In Cells

resolvedResolved · Low Priority · Version Standard

replyReply Thu 28 Feb 2008, 13:42Delegate Julia said...

Julia has attended:
Excel Consulting course
Excel Consulting course

Splitting Text In Cells

Hi

I have a column containing peoples full names eg Julia Foster.

How can I split these into first and last names in adjacent cells.

Julia

For upcoming training course dates see: Pricing & availability

replyReply Fri 29 Feb 2008, 12:37Trainer Carlos said...

RE: Splitting Text In Cells

Hi Julia

To split a a persons full name in a cell use the following code:

If the Name is in cell A1 then enter code as followis in the adjacent cells:

In B1 enter =LEFT(A1,FIND(" ",A1)-1)

The LEFT function returns all characters in a string starting from the left to a defined number.

The FIND function returns the position of the space. This indicates to the LEFT function how many characters to display

By placing the -1 after the bracket we are telling the LEFT function to return the first name BUT NOT include the Space.

In C1 enter =MID(A2,FIND(" ",A2)+1,100)

The MID function returns all characters in a string starting from a predefined position in a string.

The FIND function returns the position of the space. This indicates to the MID function from where to start displaying the rest of the text.

By placing the +1 after the bracket in the middle section we are telling the MID function to return the last name BUT NOT include the Space. The 100 is to indicate how far to display the text. It allows for a very long name.

I have attached a spreadsheet as an example.

Hope this helps

Carlos

Attached files...

Split Names into two cells.xls

 

Please browse our web site to find out more about
excel computer course london and other Microsoft training courses.

Excel tip:

Wrapping Text in a Cell in an Excel 2010 Workbook

When you have a lot of text you want to put in a particular cell but you can't decrease the font size to fit because the text will then become ineligible, then manually wrap the text in a cell by simply pressing ALT+ENTER.

View all Excel hints and tips


Microsoft Certified Partner Accredited Training Provider: Institute of IT Training Institute of Leadership and Management - Certified Courses Security Seal verified by visa, mastercard securecard