Solved Query to Trim (1 Viewer)

Number11

Member
Local time
Today, 20:54
Joined
Jan 29, 2020
Messages
607
Hi,

I need to trim all expect the numbers

03: SET ACTION
04: SET CALL BACK
05: CLOSE

just need
03
04
05

any ideas please
 

Number11

Member
Local time
Today, 20:54
Joined
Jan 29, 2020
Messages
607
this did the job

Left([ACTION],2)
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 03:54
Joined
May 7, 2009
Messages
19,227
you can also create a function, if the "number" part has variable length, ie 01, 02, 101, 10001:
Code:
Public Function fncOnlyNumber(ByVal pString As String) As String
    With CreateObject("vbscript.regexp")
        .ignorecase = True
        .Global = True
        .pattern = "([^0-9]+)"
        
        pString = .Replace(pString, "")
    End With
    fncOnlyNumber = pString
End Function
 

Users who are viewing this thread

Top Bottom