View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.newusers
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default Parsing excel field help !

try

Sub changecharactertozero()
For Each c In Selection
For i = 1 To Len(c)
If Not IsNumeric(Mid(c, i, 1)) Then c.Replace Mid(c, i, 1), "0"
Next i
Next c
End Sub

--
Don Guillett
SalesAid Software

wrote in message
ps.com...
Does any know how can I check all the characters of a field and check
that there is not an alphanumeric character (a-z) and if there is one
changing to zero.

Ex. 5J00 = would like to change it to 5000.
20A5 = would like to change it to 2005.

Thank you.

Luis