A field is the data, how to get the results of the C field
vba12.xlsx
A field is the data, how to get the results of the C field
vba12.xlsx
Try this UDF
To use it put this formula in E1 for example then dragFunction 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
=VALUE(AlphaNum(A1))