Hi,
Try this
- Suppose your entries are in range A2:A100
- In range B2:B4, type the result
- Select B2:B100 and go to Data > Flash Fill
Hope this helps.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.
Comments have been turned off. Learn more
Hi,
Try this
Hope this helps.
Hi,Rick thanks for your great comment
Hi Mey,
you might mark or vote in one or more answers, since your issue has been solved.
For a formula approach, in Excel 2007 or later, you can use:
=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A1,
0,""),1,""),2,""),3,""),4,""),5,""),6,""),7,""),8,""),9,"")
You can use a similar approach to extract the digits, while retaining leading zero's.
For a VBA (UDF) approach, you can use these two formulas -- They cycle through either the digits, or the letters, depending on what you want to remove.
Option Explicit
Function RemDigits(S As String) As String
Dim I As Long
Dim str As String
str = S
For I = 0 To 9
str = Replace(str, I, "")
Next I
RemDigits = str
End Function
Function RemText(S As String) As String
Dim I As Long
Dim str As String
str = S
For I = 1 To 26 'for clarity as there are 26 letters
str = Replace(str, Chr(I + 64), "", compare:=vbTextCompare)
Next I
RemText = str
End Function