Question about Stripping a Field

exm206

New Member
Joined
Jun 11, 2003
Messages
19
I have an address field in a table of about 200,000 records. The format for the field is the house number, then the street name. These addresses were entered free hand so there is great variation in how they are entered. For example, some may say "100 Main St." or " 100 Main Street" or " 100 Main St". As you can see, there may be a number of spaces before the house number. Another problem is that the house number can be any number of digits. The one constant is that every record has only one space between the house number and the street name. What I am trying to do is create a new field with just the street name. For example, if the address is "100 Main Street", I want the new field to say "Main Street". I have tried the Left, Right, and Mid functions, but there are so many variations on the length of the house number and the length of the field as a whole that I would have to 30 or 40 queries to get them all. My question is, is there a way to strip just the Street name from this field. In other words is there some way I can tell Access to give me everything after the space between the house number and the street name? Any help you could give me would be greatly appreciated.
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
You can use the Val function for this. Try something like:

Number: Val([Addr])

Street: Mid([Addr],Len(CStr(Val([Addr])))+2)

where Addr is your address field.

HTH,

Russell :outtahere:
 
Upvote 0
Note that this will not work in cases where something like "0012 Main Street " was put in for an address...but hopefully you don't have anything like that.
 
Upvote 0

Forum statistics

Threads
1,223,549
Messages
6,172,988
Members
452,496
Latest member
VC777

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top