A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Need a function



 
 
Thread Tools Display Modes
  #1  
Old December 4th, 2003, 03:59 PM
external usenet poster
 
Posts: n/a
Default Need a function

I created a database that has a column for Addresses. In
order to search for items all on the same street I listed
the street number behind the street name. i.e. Main St.
2106 and now I need to create another column that places
the street number back in front of the street name. i.e.
2106 Main St. I know there is a function that will do
this for me but I cannot seem to figure it out. Help!!!
  #2  
Old December 4th, 2003, 04:18 PM
Jason Morin
external usenet poster
 
Posts: n/a
Default Need a function

One way:

=MID(A1,MATCH(TRUE,ISNUMBER(1*MID(A1,ROW(INDIRECT( "1:"&LEN
(A1))),1)),0),255)&" "&LEFT(A1,MATCH(TRUE,ISNUMBER(1*MID
(A1,ROW(INDIRECT("1:"&LEN(A1))),1)),0)-2)

Array-entered (meaning press ctrl-shift-enter).

HTH
Jason
Atlanta, GA

-----Original Message-----
I created a database that has a column for Addresses. In
order to search for items all on the same street I listed
the street number behind the street name. i.e. Main St.
2106 and now I need to create another column that places
the street number back in front of the street name. i.e.
2106 Main St. I know there is a function that will do
this for me but I cannot seem to figure it out. Help!!!
.

  #3  
Old December 4th, 2003, 04:36 PM
Stephen Bye
external usenet poster
 
Posts: n/a
Default Need a function

You would have made life a lot easier for yourself if you had just designed
your database with the street number in a separate column.

wrote in message
...
I created a database that has a column for Addresses. In
order to search for items all on the same street I listed
the street number behind the street name. i.e. Main St.
2106 and now I need to create another column that places
the street number back in front of the street name. i.e.
2106 Main St. I know there is a function that will do
this for me but I cannot seem to figure it out. Help!!!



  #4  
Old December 4th, 2003, 11:31 PM
Ron Rosenfeld
external usenet poster
 
Posts: n/a
Default Need a function

On Thu, 4 Dec 2003 07:59:47 -0800, wrote:

I created a database that has a column for Addresses. In
order to search for items all on the same street I listed
the street number behind the street name. i.e. Main St.
2106 and now I need to create another column that places
the street number back in front of the street name. i.e.
2106 Main St. I know there is a function that will do
this for me but I cannot seem to figure it out. Help!!!


Assuming there is a number at the end of every entry, then:

=RIGHT(A1,LEN(A1)-FIND("~",SUBSTITUTE(A1," ",
"~",LEN(A1)-LEN(SUBSTITUTE(A1," ","")))))& " " &
LEFT(A1,FIND("~",SUBSTITUTE(A1," ","~",LEN(A1)-
LEN(SUBSTITUTE(A1," ",""))))-1)


--ron
  #5  
Old December 5th, 2003, 01:26 AM
Harlan Grove
external usenet poster
 
Posts: n/a
Default Need a function

"Jason Morin" wrote...
One way:

=MID(A1,MATCH(TRUE,ISNUMBER(1*MID(A1,ROW(INDIRECT ("1:"&LEN
(A1))),1)),0),255)&" "&LEFT(A1,MATCH(TRUE,ISNUMBER(1*MID
(A1,ROW(INDIRECT("1:"&LEN(A1))),1)),0)-2)

Array-entered (meaning press ctrl-shift-enter).


A1: 107th Street 123
Formula: #VALUE!

A1: West 57th Street 987
Formula: 57th Street 987 West

You're searching left to right. You should be searching right to left.

=RIGHT(A1,MATCH(TRUE,ISERROR(-MID(A1,LEN(A1)-ROW(INDIRECT("1:"&LEN(A1)))+1,
1)),0)-1)&" "&LEFT(A1,LEN(A1)-MATCH(TRUE,ISERROR(-MID(A1,LEN(A1)-
ROW(INDIRECT("1:"&LEN(A1)))+1,1)),0))

--
Never attach files.
Snip unnecessary quoted text.
Never multipost (though crossposting is usually OK).
Don't change subject lines because it corrupts Google newsgroup archives.
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:42 AM.


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