Re: Erase numeric digits only
From: JE McGimpsey (jemcgimpsey_at_mvps.org)
Date: 05/26/04
- Next message: Renee: "Is there a formula for this?"
- Previous message: an: "Re: Erase numeric digits only"
- In reply to: an: "Erase numeric digits only"
- Next in thread: Aladin Akyurek: "Re: Erase numeric digits only"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 26 May 2004 10:31:46 -0600
One way:
Public Function DeleteNumbers(ByVal sIn As String) As String
Dim i As Long
If sIn Like "*[0-9]*" Then 'only process if numbers
For i = 1 To Len(sIn)
If Mid(sIn, i, 1) Like "[!0-9]" Then
DeleteNumbers = DeleteNumbers & Mid(sIn, i, 1)
End If
Next i
Else
DeleteNumbers = sIn
End If
End Function
If you don't know much about UDF's see David McRitchie's "Getting
Started with Macros and User Defined Functions":
http://www.mvps.org/dmcritchie/excel/getstarted.htm
In article <12e9001c4433b$4a2ed090$a501280a@phx.gbl>,
"an" <anonymous@discussions.microsoft.com> wrote:
> Hello!
>
> I have an alphanumeric column data with:
>
> nnnTEXT
> nnnnnTEXT
> nTEXT
> nnTEXT
> ...
>
> Where n=numeric digits
>
> In column, I need to erase all numeric digits, to TEXT.
> Is it possible with Excel Function?
>
> Thanks in advance.
> an
- Next message: Renee: "Is there a formula for this?"
- Previous message: an: "Re: Erase numeric digits only"
- In reply to: an: "Erase numeric digits only"
- Next in thread: Aladin Akyurek: "Re: Erase numeric digits only"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|