Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default help on splitting into columns

In excel,i have a column having the phonenumber and emailid(both in
the same column) how to split into 2 ?
please help me to split the phone number and email id into two
different columns....
example : in column A ,is to be separated as
0998786751 in column B and
in column C
note:the length of phone number and email id may vary...
Give me a formula not a macro..
there are 1000's of records like this
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default help on splitting into columns

Here's one way but if you have 1000's of these this might not be the best
way to go. Also, if an email address contains numbers how would you know
where the phone number ends (unless *every* phone number is the same length)
and the email address begins?

123456789012big4U<athere.com

In the above the email address is 2big4U<athere.com

With that in mind, try these:

A1 = 0998786751fish<atgmail.com

For the phone number, array entered** :

=LEFT(A1,MATCH(FALSE,ISNUMBER(-MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1)),0)-1)

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER)

For the email address, assuming the above formula is entered in B1:

=SUBSTITUTE(A1,B1,"")


--
Biff
Microsoft Excel MVP


wrote in message
...
In excel,i have a column having the phonenumber and emailid(both in
the same column) how to split into 2 ?
please help me to split the phone number and email id into two
different columns....
example : in column A ,is to be separated as
0998786751 in column B and
in column C
note:the length of phone number and email id may vary...
Give me a formula not a macro..
there are 1000's of records like this



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default help on splitting into columns

Here's a slightly shorter array formula** for the phone number:

=LEFT(A1,MATCH(1,--ISERR(-MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1)),0)-1)

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER)


--
Biff
Microsoft Excel MVP


"T. Valko" wrote in message
...
Here's one way but if you have 1000's of these this might not be the best
way to go. Also, if an email address contains numbers how would you know
where the phone number ends (unless *every* phone number is the same
length) and the email address begins?

123456789012big4U<athere.com

In the above the email address is 2big4U<athere.com

With that in mind, try these:

A1 = 0998786751fish<atgmail.com

For the phone number, array entered** :

=LEFT(A1,MATCH(FALSE,ISNUMBER(-MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1)),0)-1)

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER)

For the email address, assuming the above formula is entered in B1:

=SUBSTITUTE(A1,B1,"")


--
Biff
Microsoft Excel MVP


wrote in message
...
In excel,i have a column having the phonenumber and emailid(both in
the same column) how to split into 2 ?
please help me to split the phone number and email id into two
different columns....
example : in column A ,is to be separated as
0998786751 in column B and
in column C
note:the length of phone number and email id may vary...
Give me a formula not a macro..
there are 1000's of records like this





  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,718
Default help on splitting into columns

In B1: =""&LOOKUP(99^99,MID(A1,1,ROW(INDIRECT("1:"&LEN(A1 ))))+0)

In C1: =SUBSTITUTE(A1,B1,"")


" wrote:

In excel,i have a column having the phonenumber and emailid(both in
the same column) how to split into 2 ?
please help me to split the phone number and email id into two
different columns....
example : in column A ,is to be separated as
0998786751 in column B and
in column C
note:the length of phone number and email id may vary...
Give me a formula not a macro..
there are 1000's of records like this

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default help on splitting into columns

=""&LOOKUP(99^99,MID(A1,1,ROW(INDIRECT("1:"&LEN(A 1))))+0)

That drops leading zeros.


--
Biff
Microsoft Excel MVP


"Teethless mama" wrote in message
...
In B1: =""&LOOKUP(99^99,MID(A1,1,ROW(INDIRECT("1:"&LEN(A1 ))))+0)

In C1: =SUBSTITUTE(A1,B1,"")


" wrote:

In excel,i have a column having the phonenumber and emailid(both in
the same column) how to split into 2 ?
please help me to split the phone number and email id into two
different columns....
example : in column A ,is to be separated as
0998786751 in column B and
in column C
note:the length of phone number and email id may vary...
Give me a formula not a macro..
there are 1000's of records like this





  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default help on splitting into columns

Here's another version to get the phone number with a caveat.

Assumes you will *never* insert new rows above the range. That way we can
get rid of the volatile function INDIRECT.

Normally entered (not array entered).

=LEFT(A1,SUMPRODUCT(--ISNUMBER(-MID(A1,ROW(A$1:A$50),1))))

--
Biff
Microsoft Excel MVP


"T. Valko" wrote in message
...
Here's a slightly shorter array formula** for the phone number:

=LEFT(A1,MATCH(1,--ISERR(-MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1)),0)-1)

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER)


--
Biff
Microsoft Excel MVP


"T. Valko" wrote in message
...
Here's one way but if you have 1000's of these this might not be the best
way to go. Also, if an email address contains numbers how would you know
where the phone number ends (unless *every* phone number is the same
length) and the email address begins?

123456789012big4U<athere.com

In the above the email address is 2big4U<athere.com

With that in mind, try these:

A1 = 0998786751fish<atgmail.com

For the phone number, array entered** :

=LEFT(A1,MATCH(FALSE,ISNUMBER(-MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1)),0)-1)

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER)

For the email address, assuming the above formula is entered in B1:

=SUBSTITUTE(A1,B1,"")


--
Biff
Microsoft Excel MVP


wrote in message
...
In excel,i have a column having the phonenumber and emailid(both in
the same column) how to split into 2 ?
please help me to split the phone number and email id into two
different columns....
example : in column A ,is to be separated as
0998786751 in column B and
in column C
note:the length of phone number and email id may vary...
Give me a formula not a macro..
there are 1000's of records like this







Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Splitting Numbers Into Different Columns Peter W Soady \(UK\) Excel Discussion (Misc queries) 3 September 30th 06 07:57 PM
Splitting Column in to 2 columns Dimri Excel Discussion (Misc queries) 1 September 12th 06 01:30 PM
Splitting one column into multiple columns [email protected] Excel Worksheet Functions 8 May 2nd 06 08:01 PM
Splitting text to columns nospaminlich Excel Worksheet Functions 5 February 6th 06 09:26 PM
Splitting text in one column into two (or more) columns. RickyDee Excel Worksheet Functions 4 December 7th 04 10:03 PM


All times are GMT +1. The time now is 01:48 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"