A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Text to Columns



 
 
Thread Tools Display Modes
  #1  
Old June 1st, 2010, 05:52 PM posted to microsoft.public.excel.misc
Emece
external usenet poster
 
Posts: 106
Default Text to Columns

Hi.

I have a column where I have names and surnames. I want to put name in one
column and surname in anoter column. In order to do this, I use Text to
Columns, but I have the following issue: if the cell contains for example
Juan Pรฉrez, it works ok, but when the cell contains Juan De los Santos, it
assumes there are three surnames, and then put me one word in each column.

This is the result, with the example mentioned:
A B C D
Juan Pรฉrez
Juan De los Santos

How can I indicate that I want De los Santos, all in one cell?

Thanks in advance

Regards,
Emece.-

Ads
  #2  
Old June 1st, 2010, 06:47 PM posted to microsoft.public.excel.misc
Luke M[_4_]
external usenet poster
 
Posts: 451
Default Text to Columns

Instead of using Text to columns, I'd do this via formulas:
First Name:
=LEFT(A2,FIND(" ",A2)-1)

Surname:
=MID(A2,FIND(" ",A2)+1,999)

--
Best Regards,

Luke M
"Emece" wrote in message
...
Hi.

I have a column where I have names and surnames. I want to put name in one
column and surname in anoter column. In order to do this, I use Text to
Columns, but I have the following issue: if the cell contains for example
Juan P้rez, it works ok, but when the cell contains Juan De los Santos, it
assumes there are three surnames, and then put me one word in each column.

This is the result, with the example mentioned:
A B C D
Juan P้rez
Juan De los Santos

How can I indicate that I want De los Santos, all in one cell?

Thanks in advance

Regards,
Emece.-



  #3  
Old June 1st, 2010, 07:11 PM posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 562
Default Text to Columns

With: Juan De los Santos in cell A1 -
* In cell C1 Type: =TRIM(RIGHT(A1,FIND(" ",A1)+1))
* In cell B1 type: =SUBSTITUTE(A1,C1,"")
Micky


"Emece" wrote:

Hi.

I have a column where I have names and surnames. I want to put name in one
column and surname in anoter column. In order to do this, I use Text to
Columns, but I have the following issue: if the cell contains for example
Juan Pรฉrez, it works ok, but when the cell contains Juan De los Santos, it
assumes there are three surnames, and then put me one word in each column.

This is the result, with the example mentioned:
A B C D
Juan Pรฉrez
Juan De los Santos

How can I indicate that I want De los Santos, all in one cell?

Thanks in advance

Regards,
Emece.-

  #4  
Old June 1st, 2010, 07:58 PM posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 562
Default Text to Columns

You may try also the Text to Columns feature.
In step 2 of 3 drag out(!) the marked vertical divider and press "Finish".
http://img69.imageshack.us/img69/4248/nonamef.png
Micky


"Emece" wrote:

Hi.

I have a column where I have names and surnames. I want to put name in one
column and surname in anoter column. In order to do this, I use Text to
Columns, but I have the following issue: if the cell contains for example
Juan Pรฉrez, it works ok, but when the cell contains Juan De los Santos, it
assumes there are three surnames, and then put me one word in each column.

This is the result, with the example mentioned:
A B C D
Juan Pรฉrez
Juan De los Santos

How can I indicate that I want De los Santos, all in one cell?

Thanks in advance

Regards,
Emece.-

  #5  
Old June 1st, 2010, 10:55 PM posted to microsoft.public.excel.misc
Gord Dibben
external usenet poster
 
Posts: 20,252
Default Text to Columns

Your method works only with fixed width Micky.

Which is OK if all first names are same length.


Gord Dibben MS Excel MVP

On Tue, 1 Jun 2010 11:58:01 -0700, ????? (????) ?????
micky-a[atsymbol]tapuz[dot]co[dot]il wrote:

You may try also the Text to Columns feature.
In step 2 of 3 drag out(!) the marked vertical divider and press "Finish".
http://img69.imageshack.us/img69/4248/nonamef.png
Micky


"Emece" wrote:

Hi.

I have a column where I have names and surnames. I want to put name in one
column and surname in anoter column. In order to do this, I use Text to
Columns, but I have the following issue: if the cell contains for example
Juan P้rez, it works ok, but when the cell contains Juan De los Santos, it
assumes there are three surnames, and then put me one word in each column.

This is the result, with the example mentioned:
A B C D
Juan P้rez
Juan De los Santos

How can I indicate that I want De los Santos, all in one cell?

Thanks in advance

Regards,
Emece.-


  #6  
Old June 2nd, 2010, 07:10 PM posted to microsoft.public.excel.misc
Emece
external usenet poster
 
Posts: 106
Default Text to Columns

Thanks to all for your helpful replies.

I need a little extra help.

I noticed that there are some cases in which I have two names also.

So I have the following options: two names and one surname, one name and two
surnames, and two names and two surnames.

Examples:
John Steven Jackson
John Jackson
John Jackson Ville

Which formulas are suitable for all options? I want to obtain names in one
cell, surnames in other cell.

Thanks again.

Regards,
Emece.-


"Gord Dibben" wrote:

Your method works only with fixed width Micky.

Which is OK if all first names are same length.


Gord Dibben MS Excel MVP

On Tue, 1 Jun 2010 11:58:01 -0700, ????? (????) ?????
micky-a[atsymbol]tapuz[dot]co[dot]il wrote:

You may try also the Text to Columns feature.
In step 2 of 3 drag out(!) the marked vertical divider and press "Finish".
http://img69.imageshack.us/img69/4248/nonamef.png
Micky


"Emece" wrote:

Hi.

I have a column where I have names and surnames. I want to put name in one
column and surname in anoter column. In order to do this, I use Text to
Columns, but I have the following issue: if the cell contains for example
Juan Pรฉrez, it works ok, but when the cell contains Juan De los Santos, it
assumes there are three surnames, and then put me one word in each column.

This is the result, with the example mentioned:
A B C D
Juan Pรฉrez
Juan De los Santos

How can I indicate that I want De los Santos, all in one cell?

Thanks in advance

Regards,
Emece.-


.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:27 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright ฉ2004-2020 OfficeFrustration.
The comments are property of their posters.