+ Reply to Thread
Results 1 to 3 of 3

Search & delete ANY text in select columns

  1. #1
    Registered User
    Join Date
    01-28-2006
    Posts
    5

    Search & delete ANY text in select columns

    I import statistical results from another program (Stata) and with it comes text that I want to get rid of. Specifically in select columns I want to erase any text in those columns. I'm just not sure how to identify "any text" when I do my search and replace for the selected columns. Any help?

    Thank you!

  2. #2
    CLR
    Guest

    RE: Search & delete ANY text in select columns

    ASAP Utilities, a free Add-in available at www.asap-utilities.com has
    features to delete all alpha characters or only select ones.........

    Vaya con Dios,
    Chuck, CABGx3



    "huruta" wrote:

    >
    > I import statistical results from another program (Stata) and with it
    > comes text that I want to get rid of. Specifically in select columns I
    > want to erase any text in those columns. I'm just not sure how to
    > identify "any text" when I do my search and replace for the selected
    > columns. Any help?
    >
    > Thank you!
    >
    >
    > --
    > huruta
    > ------------------------------------------------------------------------
    > huruta's Profile: http://www.excelforum.com/member.php...o&userid=30930
    > View this thread: http://www.excelforum.com/showthread...hreadid=557422
    >
    >


  3. #3
    Gord Dibben
    Guest

    Re: Search & delete ANY text in select columns

    Select your columns then run this macro.

    Sub RemoveAlphas()
    '' Remove alpha characters from a string.
    '' except for decimal points
    Dim intI As Integer
    Dim rngR As Range, rngRR As Range
    Dim strNotNum As String, strTemp As String
    Set rngRR = Selection.SpecialCells(xlCellTypeConstants, _
    xlTextValues)
    For Each rngR In rngRR
    strTemp = ""
    For intI = 1 To Len(rngR.Value)
    If Mid(rngR.Value, intI, 1) Like "[0-9.]" Then
    strNotNum = Mid(rngR.Value, intI, 1)
    Else: strNotNum = ""
    End If
    strTemp = strTemp & strNotNum
    Next intI
    rngR.Value = strTemp
    Next rngR
    End Sub


    Gord Dibben MS Excel MVP

    On Fri, 30 Jun 2006 12:32:55 -0500, huruta
    <[email protected]> wrote:

    >
    >I import statistical results from another program (Stata) and with it
    >comes text that I want to get rid of. Specifically in select columns I
    >want to erase any text in those columns. I'm just not sure how to
    >identify "any text" when I do my search and replace for the selected
    >columns. Any help?
    >
    >Thank you!



+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1