idnoidno
07-21-2017, 12:34 AM
A field is the data, how to get the results of the C field
19832
YasserKhalil
07-21-2017, 01:09 AM
Try this UDF
Function AlphaNum(txt As String, Optional numOnly As Boolean = True) As String
txt = Split(Application.WorksheetFunction.Trim(txt), " ")(1)
With CreateObject("VBScript.RegExp")
.Pattern = IIf(numOnly = True, "\D+", "-?\d+(\.\d+)?")
.Global = True
AlphaNum = Trim(.Replace(txt, ""))
End With
End Function
To use it put this formula in E1 for example then drag
=VALUE(AlphaNum(A1))
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.