I have the data in different cells contain number and English letter,
For example:
1209N
WS123
B10-0909C
0908M
Result:
1209
123
10-0909
0908
How can I just remove the English letter in these cells?
You can do this with a User Defined Function (UDF).
To enter this User Defined Function (UDF), <alt-F11> opens the Visual Basic
Editor.
Ensure your project is highlighted in the Project Explorer window.
Then, from the top menu, select Insert/Module and
paste the code below into the window that opens.
To use this User Defined Function (UDF), enter a formula like
=RemAlpha(A1)
in some cell.
=============================
Option Explicit
Function RemAlpha(s As String) As String
Dim re As Object
Set re = CreateObject("vbscript.regexp")
re.Global = True
re.ignorecase = True
re.Pattern = "[A-Z]"
RemAlpha = re.Replace(s, "")
End Function
=================================
--ron