Extract Text or Number from a Column


Extract Text or Number from a Column:

The problem is your excel file contains text and numbers  as a combined format.

now you want to seperate numbers from the text.so here is Excel Macro code for the above problem.

Sub GoNumeric()
Dim Rng As Range, c As Range, NumChrs As String
Set Rng = Range("A1:A4")
For Each c In Rng
  NumChrs = ""
  For i = 1 To Len(c)
    If IsNumeric(Mid(c, i, 1)) Then NumChrs = NumChrs & Mid(c, i, 1)
  Next i
  c = NumChrs
Next c
End Sub
 

 
Previous
Next Post »