Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Separating parts of a string 1

Status
Not open for further replies.

SteveW99

MIS
Mar 11, 2004
9
GB
Our data entry is not consistent and contains fields such as 'H1345' and '1345/'. How can I separate the numeric parts to yield '1345' in both cases?
 
Do you have any instances with non-numeric strings at both the beginning and the end of the field, and numbers you want to extract inbetween?
 
The strings typically start with either a non numeric or a numeric and end with a non numeric
 
Code:
If Val({YourField}) = 0
Then 
CDbl(StrReverse(ToText((Val(StrReverse({Your.Field}))),0,"")))
Else Val({Your.Field})
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top