Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
CyndyG
 
Posts: n/a
Default UnKnown Character Removal

I would like to have a command button to run code that would check for
unknown characters in column A. I need to remove the end of file character
before it is copied to a template. I don't know how many rows to have
searched because data with vary. The data consist of all numbers.
  #2   Report Post  
Biff
 
Posts: n/a
Default

Hi!

This *might* work.

From David McRitchie:

http://www.mvps.org/dmcritchie/excel/join.htm#trimall

Biff

"CyndyG" wrote in message
...
I would like to have a command button to run code that would check for
unknown characters in column A. I need to remove the end of file
character
before it is copied to a template. I don't know how many rows to have
searched because data with vary. The data consist of all numbers.



  #3   Report Post  
Gord Dibben
 
Posts: n/a
Default

Cyndy

Try this macro. If no luck, post back and we'll see about another tack.

Public Sub StripAll_But_Nums()
Dim rConsts As Range
Dim rCell As Range
Dim i As Long
Dim sChar As String
Dim sTemp As String
On Error Resume Next
Set rConsts = Selection.SpecialCells(xlCellTypeConstants)
On Error GoTo 0
If Not rConsts Is Nothing Then
For Each rCell In rConsts
With rCell
For i = 1 To Len(.Text)
sChar = Mid(.Text, i, 1)
If sChar Like "[0-9]" Then _
sTemp = sTemp & sChar
Next i
.Value = sTemp
End With
sTemp = ""
Next rCell
End If
End Sub


Gord Dibben Excel MVP

On Wed, 27 Apr 2005 12:51:43 -0700, CyndyG
wrote:

I would like to have a command button to run code that would check for
unknown characters in column A. I need to remove the end of file character
before it is copied to a template. I don't know how many rows to have
searched because data with vary. The data consist of all numbers.


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
install Office Assistant character file? billcamp Excel Discussion (Misc queries) 2 April 8th 05 01:39 PM
Copy a column in worksheet with a character change photowiz Excel Worksheet Functions 1 February 5th 05 03:35 PM
Searching a cell for a certain character. Matt Excel Worksheet Functions 3 January 3rd 05 09:14 PM
Removing ' character from cells Don Excel Discussion (Misc queries) 5 December 21st 04 05:41 PM
Unknown Character removal Jerrard Excel Worksheet Functions 3 November 5th 04 10:46 PM


All times are GMT +1. The time now is 12:48 PM.

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"