Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
huruta
 
Posts: n/a
Default 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!


--
huruta
------------------------------------------------------------------------
huruta's Profile: http://www.excelforum.com/member.php...o&userid=30930
View this thread: http://www.excelforum.com/showthread...hreadid=557422

  #2   Report Post  
Posted to microsoft.public.excel.misc
CLR
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.misc
Gord Dibben
 
Posts: n/a
Default 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
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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
TEXT TO COLUMNS WITH LEADING ZEROS Peggy Excel Discussion (Misc queries) 6 April 27th 23 03:45 AM
consolidation of tables in excel with text and figures samenvoegen van sheets Excel Worksheet Functions 8 March 2nd 06 03:27 PM
How do I unwrap text to columns? ChristineR Excel Discussion (Misc queries) 2 December 9th 05 03:46 PM
search for text within text BigDave Excel Worksheet Functions 2 November 17th 05 08:30 PM
How do I compare two columns on seperate sheets and replace text . hag400 Excel Worksheet Functions 1 December 28th 04 02:32 PM


All times are GMT +1. The time now is 12:29 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"