same text (1 Viewer)

amberjen

New member
Local time
Today, 13:07
Joined
Jun 7, 2018
Messages
4
hello,

I have a field that contains digits and text. the text is "x". I want to create a query to show is the digits after the "x". Could someone help?:confused:

example: field 1: xxxx-1234 or xxxxxxx256
 

plog

Banishment Pending
Local time
Today, 12:07
Joined
May 11, 2011
Messages
11,638

bastanu

AWF VIP
Local time
Today, 10:07
Joined
Apr 13, 2010
Messages
1,402
Or in a pinch use Field1Numeric:Replace(Replace([Field1],"x",""),"-","").

Cheers,
Vlad
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 12:07
Joined
Feb 28, 2001
Messages
27,146
Or if it is ALWAYS delimited by "-" then look into the SPLIT function. But if the delimiter is NOT always "-" (e.g. NO delimiter, as shown in your second example), then you have a much worse problem on your hands. You would have to parse this backwards to find the first non-digit character when testing from right to left.
 

June7

AWF VIP
Local time
Today, 09:07
Joined
Mar 9, 2014
Messages
5,466
I presume 'x' represents any alpha and structure is not consistent and likely will require a VBA custom function. Fairly common topic. Have you searched?
 

Users who are viewing this thread

Top Bottom