Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 38
Default Isolating words and numbers to a different column

Hi I have copied an adress list into a wpreadsheet, where both names,
mailadresses and phonenumbers are at one line. Is there a formula where I can
isolate e.c. mailadresses to the next column automatically? I know left and
right formulars, but is there something like that, but more like IF(the word
conatins @) or something like that? And that goes for the numbers as well, so
that all numbers goes to column C?
Thanks

--
Therese
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,651
Default Isolating words and numbers to a different column

On Tue, 19 Sep 2006 06:24:01 -0700, Therese
wrote:

Hi I have copied an adress list into a wpreadsheet, where both names,
mailadresses and phonenumbers are at one line. Is there a formula where I can
isolate e.c. mailadresses to the next column automatically? I know left and
right formulars, but is there something like that, but more like IF(the word
conatins @) or something like that? And that goes for the numbers as well, so
that all numbers goes to column C?
Thanks


Yes it can be done.

You will need to post samples of your data, and your expected output.


--ron
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,651
Default Isolating words and numbers to a different column

On Wed, 20 Sep 2006 08:05:03 -0700, Therese
wrote:

uh...what do you mean?
to you? Or can I explain better. In A1 I have Jane Dine
38866441. I want Jane Dine in A1,
in B1, and 38866441 in C1. Can that be done automatically in a formular I can
copy down through the list?
Thanks man ;-)


It can't be done with a formula because you cannot, in Excel write a formula
that will change the contents of A1.

If you can accept having the parsed results in B1, C1 and D1, then it can be
done with formulas. Otherwise you will need to execute a VBA Macro.

For formulas, one way is to download and install Longre's free morefunc.xll
add-in from
http://xcell05.free.fr

Then use these formulas:

All the formulas assume that
the last "word" is the long number
the next to last "word" is the email address with no <spaces
the remainder is the name


B1: =REGEX.MID(A1,".*(?=\s\S+@\S+\s)")
C1: =REGEX.MID(A1,"\b\S+@\S+\b")
D1: =REGEX.MID(A1,"\w+",-1)

You could also use these built-in functions, but they are more cumbersome:

B1:
=LEFT(A1,-1+FIND(CHAR(1),SUBSTITUTE(A1," ",
CHAR(1),LEN(A1)-LEN(SUBSTITUTE(A1," ",""))-1)))

C1:
=MID(A1,FIND(CHAR(1),SUBSTITUTE(A1," ",
CHAR(1),LEN(A1)-LEN(SUBSTITUTE(A1," ",""))-1))
+1,FIND(CHAR(1),SUBSTITUTE(A1," ",CHAR(1),
LEN(A1)-LEN(SUBSTITUTE(A1," ",""))))-FIND(CHAR(1),
SUBSTITUTE(A1," ",CHAR(1),LEN(A1)-
LEN(SUBSTITUTE(A1," ",""))-1))-1)

D1:
=MID(A1,1+FIND(CHAR(1),SUBSTITUTE(A1," ",
CHAR(1),LEN(A1)-LEN(SUBSTITUTE(A1," ","")))),255)


--ron
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 38
Default Isolating words and numbers to a different column

wooow. Thanks. I will need some time to get it work but thanks a lot for your
job.

Therese


"Ron Rosenfeld" wrote:

On Wed, 20 Sep 2006 08:05:03 -0700, Therese
wrote:

uh...what do you mean?
to you? Or can I explain better. In A1 I have Jane Dine
38866441. I want Jane Dine in A1,
in B1, and 38866441 in C1. Can that be done automatically in a formular I can
copy down through the list?
Thanks man ;-)


It can't be done with a formula because you cannot, in Excel write a formula
that will change the contents of A1.

If you can accept having the parsed results in B1, C1 and D1, then it can be
done with formulas. Otherwise you will need to execute a VBA Macro.

For formulas, one way is to download and install Longre's free morefunc.xll
add-in from
http://xcell05.free.fr

Then use these formulas:

All the formulas assume that
the last "word" is the long number
the next to last "word" is the email address with no <spaces
the remainder is the name


B1: =REGEX.MID(A1,".*(?=\s\S+@\S+\s)")
C1: =REGEX.MID(A1,"\b\S+@\S+\b")
D1: =REGEX.MID(A1,"\w+",-1)

You could also use these built-in functions, but they are more cumbersome:

B1:
=LEFT(A1,-1+FIND(CHAR(1),SUBSTITUTE(A1," ",
CHAR(1),LEN(A1)-LEN(SUBSTITUTE(A1," ",""))-1)))

C1:
=MID(A1,FIND(CHAR(1),SUBSTITUTE(A1," ",
CHAR(1),LEN(A1)-LEN(SUBSTITUTE(A1," ",""))-1))
+1,FIND(CHAR(1),SUBSTITUTE(A1," ",CHAR(1),
LEN(A1)-LEN(SUBSTITUTE(A1," ",""))))-FIND(CHAR(1),
SUBSTITUTE(A1," ",CHAR(1),LEN(A1)-
LEN(SUBSTITUTE(A1," ",""))-1))-1)

D1:
=MID(A1,1+FIND(CHAR(1),SUBSTITUTE(A1," ",
CHAR(1),LEN(A1)-LEN(SUBSTITUTE(A1," ","")))),255)


--ron



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,651
Default Isolating words and numbers to a different column

On Thu, 21 Sep 2006 08:31:01 -0700, Therese
wrote:

wooow. Thanks. I will need some time to get it work but thanks a lot for your
job.

Therese



You're welcome. Let me know how it works for you.


--ron
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,886
Default Isolating words and numbers to a different column

Hi Therese

As an alternative to the formula method, you could use the DataText to
columns wizard.
Work on a copy of your data - Just in case!!!!

With all of your data in column A
Mark column A
DataText to ColumnsDelimitedNextClick SpaceNextFinish
That gives you a column of
Forenames in A
Last in B
email address in C
Number in D

Insert a new column at C
in C1 =A1&" "&B1 and copy down
Mark the whole of column C, CopyPaste SpecialValues to "fix" the data.
Delete columns A and B


--
Regards

Roger Govier


"Therese" wrote in message
...
wooow. Thanks. I will need some time to get it work but thanks a lot
for your
job.

Therese


"Ron Rosenfeld" wrote:

On Wed, 20 Sep 2006 08:05:03 -0700, Therese

wrote:

uh...what do you mean?
to you? Or can I explain better. In A1 I have Jane Dine
38866441. I want Jane Dine in A1,

in B1, and 38866441 in C1. Can that be done automatically in a
formular I can
copy down through the list?
Thanks man ;-)


It can't be done with a formula because you cannot, in Excel write a
formula
that will change the contents of A1.

If you can accept having the parsed results in B1, C1 and D1, then it
can be
done with formulas. Otherwise you will need to execute a VBA Macro.

For formulas, one way is to download and install Longre's free
morefunc.xll
add-in from http://xcell05.free.fr

Then use these formulas:

All the formulas assume that
the last "word" is the long number
the next to last "word" is the email address with no <spaces
the remainder is the name


B1: =REGEX.MID(A1,".*(?=\s\S+@\S+\s)")
C1: =REGEX.MID(A1,"\b\S+@\S+\b")
D1: =REGEX.MID(A1,"\w+",-1)

You could also use these built-in functions, but they are more
cumbersome:

B1:
=LEFT(A1,-1+FIND(CHAR(1),SUBSTITUTE(A1," ",
CHAR(1),LEN(A1)-LEN(SUBSTITUTE(A1," ",""))-1)))

C1:
=MID(A1,FIND(CHAR(1),SUBSTITUTE(A1," ",
CHAR(1),LEN(A1)-LEN(SUBSTITUTE(A1," ",""))-1))
+1,FIND(CHAR(1),SUBSTITUTE(A1," ",CHAR(1),
LEN(A1)-LEN(SUBSTITUTE(A1," ",""))))-FIND(CHAR(1),
SUBSTITUTE(A1," ",CHAR(1),LEN(A1)-
LEN(SUBSTITUTE(A1," ",""))-1))-1)

D1:
=MID(A1,1+FIND(CHAR(1),SUBSTITUTE(A1," ",
CHAR(1),LEN(A1)-LEN(SUBSTITUTE(A1," ","")))),255)


--ron



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
how can I sort a column numerically with both words and numbers i. Cam890 Excel Discussion (Misc queries) 2 September 16th 09 08:31 PM
auto sum column containing words and numbers Tacrier Excel Worksheet Functions 3 June 27th 08 12:57 PM
Isolating text and numbers [email protected] Excel Discussion (Misc queries) 8 April 28th 07 02:29 AM
looking to assign different numbers in column B to different words in column A mike Excel Worksheet Functions 2 January 13th 05 01:46 AM
Searching for a words in a column from a list of words. Scott Excel Programming 5 August 15th 03 02:40 PM


All times are GMT +1. The time now is 09:35 AM.

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

About Us

"It's about Microsoft Excel"