I have data formatted in column A like:
Sheldon Barnes <nhr4man@nc.rr.com>,
Miriam DURVAMC Mil34ler <miriam....miller@va.gov>,
Eddie Barnes <e.barne26s@verizon.net>,
Deloris Bell-Johnson <db12345ell67@nc.rr.com>,
Brenda Bethea <bbethea@email.un453c.edu>,
jessie bowen <jbowen8kdkdkd871@aol.com>,
How can i separate into three columns?
First Name, Last Name, E-mail
Many Thanks in Advance
Greg
|
|
0
|
|
|
|
Reply
|
Utf
|
12/13/2009 8:30:01 PM |
|
Hi Greg,
See if Text To Column under Data will do that for you. Use Space as the
Delimiter.
It worked for me on a simple test of your data but did leave the "<" in
front of the e-mail address. Perhaps a remove > replace "< " replace with
nothing > Ok will take care of that.
Also, the last name is left underlined and in blue font color, a couple of
steps to clear that up will be in order. Select and remove the underline
and while selected return font color to Automatic.
HTH
Regards,
Howard
"Greg" <Greg@discussions.microsoft.com> wrote in message
news:378F6002-B7E4-4A3F-8A40-454EE0336C94@microsoft.com...
>I have data formatted in column A like:
>
> Sheldon Barnes <nhr4man@nc.rr.com>,
> Miriam DURVAMC Mil34ler <miriam....miller@va.gov>,
> Eddie Barnes <e.barne26s@verizon.net>,
> Deloris Bell-Johnson <db12345ell67@nc.rr.com>,
> Brenda Bethea <bbethea@email.un453c.edu>,
> jessie bowen <jbowen8kdkdkd871@aol.com>,
>
> How can i separate into three columns?
> First Name, Last Name, E-mail
>
> Many Thanks in Advance
> Greg
|
|
0
|
|
|
|
Reply
|
L
|
12/13/2009 9:46:39 PM
|
|
What did that method do with middle names, as in the second entry in the
OP's list of examples?
--
David Biddulph
"L. Howard Kittle" <lhkittle@comcast.net> wrote in message
news:%23sNYC3DfKHA.1652@TK2MSFTNGP05.phx.gbl...
> Hi Greg,
>
> See if Text To Column under Data will do that for you. Use Space as the
> Delimiter.
>
> It worked for me on a simple test of your data but did leave the "<" in
> front of the e-mail address. Perhaps a remove > replace "< " replace with
> nothing > Ok will take care of that.
>
> Also, the last name is left underlined and in blue font color, a couple of
> steps to clear that up will be in order. Select and remove the underline
> and while selected return font color to Automatic.
>
> HTH
> Regards,
> Howard
>
> "Greg" <Greg@discussions.microsoft.com> wrote in message
> news:378F6002-B7E4-4A3F-8A40-454EE0336C94@microsoft.com...
>>I have data formatted in column A like:
>>
>> Sheldon Barnes <nhr4man@nc.rr.com>,
>> Miriam DURVAMC Mil34ler <miriam....miller@va.gov>,
>> Eddie Barnes <e.barne26s@verizon.net>,
>> Deloris Bell-Johnson <db12345ell67@nc.rr.com>,
>> Brenda Bethea <bbethea@email.un453c.edu>,
>> jessie bowen <jbowen8kdkdkd871@aol.com>,
>>
>> How can i separate into three columns?
>> First Name, Last Name, E-mail
>>
>> Many Thanks in Advance
>> Greg
>
>
|
|
0
|
|
|
|
Reply
|
David
|
12/14/2009 8:29:16 AM
|
|
On Sun, 13 Dec 2009 12:30:01 -0800, Greg <Greg@discussions.microsoft.com>
wrote:
>I have data formatted in column A like:
>
>Sheldon Barnes <nhr4man@nc.rr.com>,
>Miriam DURVAMC Mil34ler <miriam....miller@va.gov>,
>Eddie Barnes <e.barne26s@verizon.net>,
>Deloris Bell-Johnson <db12345ell67@nc.rr.com>,
>Brenda Bethea <bbethea@email.un453c.edu>,
>jessie bowen <jbowen8kdkdkd871@aol.com>,
>
>How can i separate into three columns?
>First Name, Last Name, E-mail
>
>Many Thanks in Advance
>Greg
These formulas rely on the following:
1. First Name is first word
2. Last Name is the last word before the "<"
3. Email is at the end and enclosed "<...>"
With data in A2:
B2 (FN): =LEFT(TRIM(A2),FIND(" ",TRIM(A2))-1)
C2 (LN):
=TRIM(RIGHT(SUBSTITUTE(TRIM(LEFT(A2,FIND("<",A2)-1))," ",REPT(" ",99)),99))
D2 (EMAIL):
=MID(TRIM(RIGHT(SUBSTITUTE(TRIM(A2)," ",REPT(" ",99)),99)),2,
FIND(">",TRIM(RIGHT(SUBSTITUTE(TRIM(A2)," ",REPT(" ",99)),99)))-2)
Or you could use a VBA Macro:
To enter this Macro (Sub), <alt-F11> opens the Visual Basic Editor.
Ensure your project is highlighted in the Project Explorer window.
Then, from the top menu, select Insert/Module and
paste the code below into the window that opens.
To use this Macro (Sub), first select the range of cells to be parsed.
Then <alt-F8> opens the macro dialog box. Select the macro by name, and <RUN>.
==================================================
Option Explicit
Sub parseFNLNEmail()
Dim re As Object, mc As Object
Dim rg As Range, c As Range
Dim i As Long, s As String
Set re = CreateObject("vbscript.regexp")
re.Global = True
re.Pattern = "(\w+).*\s(\S+)\s.*<([^>]*)"
Set rg = Selection 'or set up however is most efficient
For Each c In rg
Range(c.Offset(0, 1), c.Offset(0, 3)).ClearContents
s = c.Value
If re.test(s) = True Then
Set mc = re.Execute(s)
For i = 1 To 3
c.Offset(0, i).Value = mc(0).submatches(i - 1)
Next i
End If
Next c
End Sub
========================================================
--ron
|
|
0
|
|
|
|
Reply
|
Ron
|
12/14/2009 12:42:45 PM
|
|
Thanks, the text to column worked great!. i thought i had used that function
before but couldn't remember where it was at.
Thanks Again.
Greg
"L. Howard Kittle" wrote:
> Hi Greg,
>
> See if Text To Column under Data will do that for you. Use Space as the
> Delimiter.
>
> It worked for me on a simple test of your data but did leave the "<" in
> front of the e-mail address. Perhaps a remove > replace "< " replace with
> nothing > Ok will take care of that.
>
> Also, the last name is left underlined and in blue font color, a couple of
> steps to clear that up will be in order. Select and remove the underline
> and while selected return font color to Automatic.
>
> HTH
> Regards,
> Howard
>
> "Greg" <Greg@discussions.microsoft.com> wrote in message
> news:378F6002-B7E4-4A3F-8A40-454EE0336C94@microsoft.com...
> >I have data formatted in column A like:
> >
> > Sheldon Barnes <nhr4man@nc.rr.com>,
> > Miriam DURVAMC Mil34ler <miriam....miller@va.gov>,
> > Eddie Barnes <e.barne26s@verizon.net>,
> > Deloris Bell-Johnson <db12345ell67@nc.rr.com>,
> > Brenda Bethea <bbethea@email.un453c.edu>,
> > jessie bowen <jbowen8kdkdkd871@aol.com>,
> >
> > How can i separate into three columns?
> > First Name, Last Name, E-mail
> >
> > Many Thanks in Advance
> > Greg
>
>
> .
>
|
|
0
|
|
|
|
Reply
|
Utf
|
12/14/2009 2:54:01 PM
|
|
I missed that one, and as you would expect it went to four columns on that
entry.
Perhaps a cleaner way would have been use "<" as the delimiter for one try
and then use space on the next try (need to move some data about to make
room for the second split. Then use =LEFT(F9,LEN(F9)-2) on the address to
clean up the >, at the end.
Regards,
Howard
"David Biddulph" <groups [at] biddulph.org.uk> wrote in message
news:GPadnR51-b39arjWnZ2dnUVZ8lKdnZ2d@bt.com...
> What did that method do with middle names, as in the second entry in the
> OP's list of examples?
> --
> David Biddulph
>
> "L. Howard Kittle" <lhkittle@comcast.net> wrote in message
> news:%23sNYC3DfKHA.1652@TK2MSFTNGP05.phx.gbl...
>> Hi Greg,
>>
>> See if Text To Column under Data will do that for you. Use Space as the
>> Delimiter.
>>
>> It worked for me on a simple test of your data but did leave the "<" in
>> front of the e-mail address. Perhaps a remove > replace "< " replace
>> with nothing > Ok will take care of that.
>>
>> Also, the last name is left underlined and in blue font color, a couple
>> of steps to clear that up will be in order. Select and remove the
>> underline and while selected return font color to Automatic.
>>
>> HTH
>> Regards,
>> Howard
>>
>> "Greg" <Greg@discussions.microsoft.com> wrote in message
>> news:378F6002-B7E4-4A3F-8A40-454EE0336C94@microsoft.com...
>>>I have data formatted in column A like:
>>>
>>> Sheldon Barnes <nhr4man@nc.rr.com>,
>>> Miriam DURVAMC Mil34ler <miriam....miller@va.gov>,
>>> Eddie Barnes <e.barne26s@verizon.net>,
>>> Deloris Bell-Johnson <db12345ell67@nc.rr.com>,
>>> Brenda Bethea <bbethea@email.un453c.edu>,
>>> jessie bowen <jbowen8kdkdkd871@aol.com>,
>>>
>>> How can i separate into three columns?
>>> First Name, Last Name, E-mail
>>>
>>> Many Thanks in Advance
>>> Greg
>>
>>
>
>
|
|
0
|
|
|
|
Reply
|
L
|
12/14/2009 8:13:33 PM
|
|
|
5 Replies
615 Views
(page loaded in 0.099 seconds)
Similiar Articles: split one column to multiple columns - microsoft.public.excel ...I have data formatted in column A like: Sheldon Barnes , Miriam DURVAMC Mil34ler , Eddie Barnes , Deloris Bell-Johnson , Brenda Bethea , ... Split cells across multiple columns - microsoft.public.excel.misc ...... contents across multiple cells - Support - Office.com... is stored in one cell and split it across multiple cells ... column of addresses into multiple columns — one ... Split "Firstname Lastname" text box into two columns, Multiple Aut ...Split "Firstname Lastname" text box into two columns, Multiple Aut ... Split Single ... Excel Split the contents of one column into two columns Excel Split the contents of ... Microsoft ReportViewer - split a column into two - microsoft ...split one column to multiple columns - microsoft.public.excel ... Combining multiple columns into single column based one another ... What query would I need to ... split ... Splitting data from one spreadsheet into multiple spreadsheets ...I have on master spreadsheet on Sheet1. Column A has categories (i.e. vegetables, fruits, nuts, etc.). Columns B through F have data corresponding... Set multiple fills in single column based on value - microsoft ...Combining multiple columns into single column based one another ... filter ... ... part - split up files according to column value... split up a single input file into multiple ... Combining multiple columns into single column based one another ...Combining multiple columns into single column based one another ... What query would I need to ... split data in a field into two fields - microsoft.public.access ... ... Split text into 2 columns - microsoft.public.excel.programming ...split one column to multiple columns - microsoft.public.excel ... Split "Firstname Lastname" text box into two columns, Multiple Aut ... Split Single Text Cell Into ... Is there a way to split a sheet so columns can be different widths ...Split cells across multiple columns - microsoft ... state, zip, phone, etc in adjacent columns. ... Excel - One Column With Different Widths - I want to make ... Is there a ... Multiple ADD COLUMN in one shot? - microsoft.public.access.queries ...Combine multiple rows into one row with multiple columns ... Re: Split cells across multiple columns You have one column of ... Excel Split Cells Into Multiple Rows or ... sql - How to split a single column values to multiple column ...How to split a single column values to multiple column ... problem splitting single column values to multiple ... Single column of data into multiple columns single row How to Split Columns | eHow.comSplitting a column divides a cell or selected column into multiple columns without... ... How to Use Text to Column on Multiple Columns in VBA; How to Split a Column of ... How to Split Data into Multiple Columns in Excel 2010 - For Dummies... in Excel 2010 when you need to split combined data into separate columns ... General, Text, or Date) for each column ... separates the selected cells into multiple columns. Split one column data into multiple columnsI want to split data from one columns into three columns. Example of the data i am working with ColumnA 1235-A 1231-GD 234-F 12343 1213-F 343-E I want to ... Split One Column into multiple columns : The Official Microsoft ...Hi all, I have a requirement like this , I have Address Column.It is containing data like Mr. K KK Tank Guntur Jal Bhavan, Univercity Road, Rajkot 9843563469 7/20/2012 9:34:45 PM
|