# Removing numbers from Addresses in attribute field

2 replies to this topic

### #1 Jason JB Posted 18 March 2010 - 06:19 PM

Jason JB

Contributor

• Validated Member
• 29 posts
• Gender:Male
• Location:Penang, Malaysia
• Malaysia

Hi All,

I have a field for a point layer that has addresses (e.g 27 South Terrace) and would like to remove the number
and only retain the name of the street. Does anyone know a quick VB code to do this using the field calculator?

### #2 JimmyRocks Posted 18 March 2010 - 07:55 PM

JimmyRocks

Newbie

• Validated Member
• 7 posts
• Gender:Male
• Location:New Jersey
• Interests:Live Music, Travel, Bicycles, Photography
• United States

Hi All,

I have a field for a point layer that has addresses (e.g 27 South Terrace) and would like to remove the number
and only retain the name of the street. Does anyone know a quick VB code to do this using the field calculator?

try this code:

input = [YOUR_FIELD]
x=1
start = 1
do while x < len(input)
code = asc(mid(input,x,1))
if (code < 48 or code > 57) then
start = x
exit do
end if
x=x+1
loop
output = trim(mid(input,start))

and set your field to = output

### #3 Jason JB Posted 21 March 2010 - 07:42 PM

Jason JB

Contributor

• Validated Member
• 29 posts
• Gender:Male
• Location:Penang, Malaysia
• Malaysia

Thanks! Works like a charm

Hi All,

I have a field for a point layer that has addresses (e.g 27 South Terrace) and would like to remove the number
and only retain the name of the street. Does anyone know a quick VB code to do this using the field calculator?

try this code:

input = [YOUR_FIELD]
x=1
start = 1
do while x < len(input)
code = asc(mid(input,x,1))
if (code < 48 or code > 57) then
start = x
exit do
end if
x=x+1
loop
output = trim(mid(input,start))

and set your field to = output

#### 0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

-->