This is an example of something I did to extract out the North or South footages from a text field (like FR the SW cor 1234N..).   You may have to do something similar. 
 
Function strpnsft(ByVal s1 As String) As integer
Dim fr, n, s, a As Integer
dim s2 as string
s2=ucase$(s1)
fr = InStr(1, s2, "FR ") + 5
n = InStr(fr, s2, "N") - 1
s = InStr(fr, s2, "S") - 1
If n > -1 Then
n = n
ElseIf s > -1 Then
n = s
Else
strpnsft = 0
Exit Function
End If
For a = n To fr Step -1
Do Case (Mid$(s2, a, 1))
Case "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", " "
Case Else
Exit For
End Case
Next
strpnsft = Val(Mid$(s2, a + 1, n - a))
End Function
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of jason kerr
Sent: Friday, July 21, 2006 5:48 AM
To: Mapinfo-L
Subject: [MI-L] Extracting Numeric values

Folks,
Any possible solutions to extracting numeric values from a column, containing text and numeric characters. The numeric characters are in no particular order within the character string.
 
thanks in advance
jason
____________________________________________
Jason Kerr
CCS Surveying
127 Stranmillis Road
Belfast
BT9 5AJ
p: 028 90662442
m: 079 71633047
f: 028 90382451
 
 
 
 
 
_______________________________________________
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l

Reply via email to