Prev: Hidding rows when sorting
Next: IF Statement or VLOOKUP
From: Emece on 1 Jun 2010 12:52 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.-
From: Luke M on 1 Jun 2010 13:47 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" <Emece(a)discussions.microsoft.com> wrote in message news:8448554F-C2F1-4393-B59E-C6D58C9A05B6(a)microsoft.com... > 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.- >
From: מיכאל (מיקי) אבידן on 1 Jun 2010 14:11 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.- >
From: מיכאל (מיקי) אבידן on 1 Jun 2010 14:58 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.- >
From: Gord Dibben on 1 Jun 2010 17:55
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.- >> |