Hi!
The function I need is similar to the solution of this thread . But I need to addapt it to my own string field.
I present some examples of the data I need to manipulate:
"Record 12345/AOP/2007"
"Record 0123/2008"
"Note N° 56478/DDD/2008"
"Data 1114/2007"
etc
I will highlight the number I need from theese strings:
"Record 12345/AOP/2007"
"Record 0123/2008"
"Note N° 56478/DDD/2008"
"Data 1114/2007"
etc
You see, is the "record number", but the table isn´t normalized, is all mix up. At least it keep some coherence as you can see.
Although, sometimes you can get something like this
"Record 1546/2008 Record 31546/2007" --> in this case I just need the firt number (in bold).
Ok, that´s what I need... the problem is I not much into string function, is beyond my knowledge, and right now I don´t have time to studie it properly, so I asking for your help
This is the code from the mentioned thread:
I hope you can help me! Thanks.
The function I need is similar to the solution of this thread . But I need to addapt it to my own string field.
I present some examples of the data I need to manipulate:
"Record 12345/AOP/2007"
"Record 0123/2008"
"Note N° 56478/DDD/2008"
"Data 1114/2007"
etc
I will highlight the number I need from theese strings:
"Record 12345/AOP/2007"
"Record 0123/2008"
"Note N° 56478/DDD/2008"
"Data 1114/2007"
etc
You see, is the "record number", but the table isn´t normalized, is all mix up. At least it keep some coherence as you can see.
Although, sometimes you can get something like this
"Record 1546/2008 Record 31546/2007" --> in this case I just need the firt number (in bold).
Ok, that´s what I need... the problem is I not much into string function, is beyond my knowledge, and right now I don´t have time to studie it properly, so I asking for your help

This is the code from the mentioned thread:
Code:
Function CleanString(ByVal tmpSTR As String) As String
Dim i As Long
For i = 1 To Len(tmpSTR)
If IsNumeric(Mid$(tmpSTR, i, 1)) Then
CleanString = CleanString & Mid$(tmpSTR, i, 1)
End If
Next i
End Function
I hope you can help me! Thanks.