Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 86
Default New functions needed

Consider the following entries in Column A1:

CHRISTIAN 32 PATTERSON ME SW
TOM & PAT 235 PROMINENCE HGTS SW CALG
M 26 PATTERSON CL SW CALG
L P 54 PATTERSON PK SW CA
ROBERTO JOSE 27 PATTERSON PL SW CAL

I want to parse this out. Here's here are the columns I want:
B: Left(A1, find the first number)-2) ' Get the first name, first
name plus initial, initial(s), or first and middle names
C: Mid(A1, find the first number, Find("SW", A1) 'Get the Address

Is there any way of writing this so that it works? Is it unreasonable to
want a simple function for doing this, since everyone in business must want
to do this at some point in their lives?

Another useful function would be a BETWEEN function.

=BETWEEN(find the first number,"SW", A1)

Musing...
Jim Berglund




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default New functions needed

You can achieve the same with a combination of functions. With your text in
cell A1 try the below formulas.

'in cell B1
=LEFT(A1,MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},A1&"0123 456789"))-1)

'in cell C1
=MID(TRIM(LEFT(SUBSTITUTE(A1 & " "," SW ",REPT(" ",255)),255)),
LEN(B1)+1,255)

--
Jacob (MVP - Excel)


"Jim Berglund" wrote:

Consider the following entries in Column A1:

CHRISTIAN 32 PATTERSON ME SW
TOM & PAT 235 PROMINENCE HGTS SW CALG
M 26 PATTERSON CL SW CALG
L P 54 PATTERSON PK SW CA
ROBERTO JOSE 27 PATTERSON PL SW CAL

I want to parse this out. Here's here are the columns I want:
B: Left(A1, find the first number)-2) ' Get the first name, first
name plus initial, initial(s), or first and middle names
C: Mid(A1, find the first number, Find("SW", A1) 'Get the Address

Is there any way of writing this so that it works? Is it unreasonable to
want a simple function for doing this, since everyone in business must want
to do this at some point in their lives?

Another useful function would be a BETWEEN function.

=BETWEEN(find the first number,"SW", A1)

Musing...
Jim Berglund




.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 86
Default New functions needed

Thanks Jacob. I got this to work, and I understand the first line, but I do
have a few more questions...

In Cell C1, what is going on?

Jim

"Jacob Skaria" wrote in message
...
You can achieve the same with a combination of functions. With your text
in
cell A1 try the below formulas.

'in cell B1
=LEFT(A1,MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},A1&"0123 456789"))-1)

'in cell C1
=MID(TRIM(LEFT(SUBSTITUTE(A1 & " "," SW ",REPT(" ",255)),255)),
LEN(B1)+1,255)

--
Jacob (MVP - Excel)


"Jim Berglund" wrote:

Consider the following entries in Column A1:

CHRISTIAN 32 PATTERSON ME SW
TOM & PAT 235 PROMINENCE HGTS SW CALG
M 26 PATTERSON CL SW CALG
L P 54 PATTERSON PK SW CA
ROBERTO JOSE 27 PATTERSON PL SW CAL

I want to parse this out. Here's here are the columns I want:
B: Left(A1, find the first number)-2) ' Get the first name, first
name plus initial, initial(s), or first and middle names
C: Mid(A1, find the first number, Find("SW", A1) 'Get the Address

Is there any way of writing this so that it works? Is it unreasonable to
want a simple function for doing this, since everyone in business must
want
to do this at some point in their lives?

Another useful function would be a BETWEEN function.

=BETWEEN(find the first number,"SW", A1)

Musing...
Jim Berglund




.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default New functions needed

Jim,

Why did you submit a new post about the same problem you inquired about in
your other thread with subject "Parsing a string." In fact, you posted to
that other thread 45 minutes before starting this post. Why ?

BB

"Jim Berglund" wrote in message
...
Consider the following entries in Column A1:

CHRISTIAN 32 PATTERSON ME SW
TOM & PAT 235 PROMINENCE HGTS SW CALG
M 26 PATTERSON CL SW CALG
L P 54 PATTERSON PK SW CA
ROBERTO JOSE 27 PATTERSON PL SW CAL

I want to parse this out. Here's here are the columns I want:
B: Left(A1, find the first number)-2) ' Get the first name, first
name plus initial, initial(s), or first and middle names
C: Mid(A1, find the first number, Find("SW", A1) 'Get the Address

Is there any way of writing this so that it works? Is it unreasonable to
want a simple function for doing this, since everyone in business must
want to do this at some point in their lives?

Another useful function would be a BETWEEN function.

=BETWEEN(find the first number,"SW", A1)

Musing...
Jim Berglund






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 86
Default New functions needed

I have had difficulty in asking the question in the right way, and as I try
different ways to approach the problem, I get new ideas. I realized that I
hadn't asked the question in a way that would get me an answer I could work
with so I thought this re-phrasing might get me the answer I wanted - how to
find a number in a string.

I'm not a regular programmer, and am not familiar with the protocols of
newsgroups. If I've made an error, I apologize.

Jim


"BillyBob" wrote in message
...
Jim,

Why did you submit a new post about the same problem you inquired about in
your other thread with subject "Parsing a string." In fact, you posted to
that other thread 45 minutes before starting this post. Why ?

BB

"Jim Berglund" wrote in message
...
Consider the following entries in Column A1:

CHRISTIAN 32 PATTERSON ME SW
TOM & PAT 235 PROMINENCE HGTS SW CALG
M 26 PATTERSON CL SW CALG
L P 54 PATTERSON PK SW CA
ROBERTO JOSE 27 PATTERSON PL SW CAL

I want to parse this out. Here's here are the columns I want:
B: Left(A1, find the first number)-2) ' Get the first name, first
name plus initial, initial(s), or first and middle names
C: Mid(A1, find the first number, Find("SW", A1) 'Get the Address

Is there any way of writing this so that it works? Is it unreasonable to
want a simple function for doing this, since everyone in business must
want to do this at some point in their lives?

Another useful function would be a BETWEEN function.

=BETWEEN(find the first number,"SW", A1)

Musing...
Jim Berglund








  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default New functions needed

--It is separating the string with " SW " as delimiter and getting the
portion to the left most portion of the string.
--Then it removes the string in cell B1 from the left which ends up with the
address


--
Jacob (MVP - Excel)


"Jim Berglund" wrote:

Thanks Jacob. I got this to work, and I understand the first line, but I do
have a few more questions...

In Cell C1, what is going on?

Jim

"Jacob Skaria" wrote in message
...
You can achieve the same with a combination of functions. With your text
in
cell A1 try the below formulas.

'in cell B1
=LEFT(A1,MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},A1&"0123 456789"))-1)

'in cell C1
=MID(TRIM(LEFT(SUBSTITUTE(A1 & " "," SW ",REPT(" ",255)),255)),
LEN(B1)+1,255)

--
Jacob (MVP - Excel)


"Jim Berglund" wrote:

Consider the following entries in Column A1:

CHRISTIAN 32 PATTERSON ME SW
TOM & PAT 235 PROMINENCE HGTS SW CALG
M 26 PATTERSON CL SW CALG
L P 54 PATTERSON PK SW CA
ROBERTO JOSE 27 PATTERSON PL SW CAL

I want to parse this out. Here's here are the columns I want:
B: Left(A1, find the first number)-2) ' Get the first name, first
name plus initial, initial(s), or first and middle names
C: Mid(A1, find the first number, Find("SW", A1) 'Get the Address

Is there any way of writing this so that it works? Is it unreasonable to
want a simple function for doing this, since everyone in business must
want
to do this at some point in their lives?

Another useful function would be a BETWEEN function.

=BETWEEN(find the first number,"SW", A1)

Musing...
Jim Berglund




.

.

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
Help in EXCEL functions - needed badly kosageinusha18 New Users to Excel 4 February 4th 10 04:54 PM
help needed with lookup and related functions EdStevens Excel Worksheet Functions 3 August 19th 09 10:00 PM
Major help needed - Iterative Functions LiAD Excel Programming 15 April 1st 09 08:30 PM
efficiency: database functions vs. math functions vs. array formula nickname Excel Discussion (Misc queries) 2 July 14th 06 04:26 AM
Index and match functions help needed. Zak Excel Worksheet Functions 5 September 1st 05 02:08 PM


All times are GMT +1. The time now is 09:50 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"