A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Removing Special Characters



 
 
Thread Tools Display Modes
  #1  
Old March 22nd, 2010, 09:35 PM posted to microsoft.public.excel.worksheet.functions
Cathy Landry
external usenet poster
 
Posts: 31
Default Removing Special Characters

Hello,

I exported to Excel 2003 my Outlook Calendar and now I have a lot of odd
little square characters that I cannot remove. Any suggestions please?

Thank you!
Cathy
  #2  
Old March 22nd, 2010, 10:45 PM posted to microsoft.public.excel.worksheet.functions
Joe User[_2_]
external usenet poster
 
Posts: 757
Default Removing Special Characters

"Cathy Landry" wrote:
I exported to Excel 2003 my Outlook Calendar
and now I have a lot of odd little square characters
that I cannot remove. Any suggestions please?


Refer to http://office.microsoft.com/en-us/ex...561311033.aspx.

Basically, you can use CLEAN to remove nonprinting characters with ASCII
codes 0-31.

But I suspect the nonprinting characters you are seeing (hmm, an oxymoron?
;-) in the ASCII code range 127-255. You would need to use several
SUBSTITUTE calls to remove each one. It would be better to use a macro. I
believe someone has one; but I didn't find any with a quick Google search.
Or it might be sufficient to replace CODE(160) with a space (" ").

However, bewa some of those values might be printable characters in some
character set. You might want to save a backup copy of the Excel file before
making any changes.
  #3  
Old March 23rd, 2010, 07:27 PM posted to microsoft.public.excel.worksheet.functions
Cathy Landry
external usenet poster
 
Posts: 31
Default Removing Special Characters

Hi Joe,

Thank you for the response! I found a public function to use that's working
great!

Public Function fStripToLtrNum(strIn)
'Strips out all non-number or non-letter characters
Dim strOut As String
Dim iPos As Long

If Len(strIn & "") 0 Then
For iPos = 1 To Len(strIn)
If Mid(strIn, iPos, 1) Like "[0-9A-z]" Then
strOut = strOut & Mid(strIn, iPos, 1)
End If
Next iPos
End If

If Len(strOut) = 0 Then
fStripToLtrNum = Null
Else
fStripToLtrNum = strOut
End If
End Function

"Joe User" wrote:

"Cathy Landry" wrote:
I exported to Excel 2003 my Outlook Calendar
and now I have a lot of odd little square characters
that I cannot remove. Any suggestions please?


Refer to http://office.microsoft.com/en-us/ex...561311033.aspx.

Basically, you can use CLEAN to remove nonprinting characters with ASCII
codes 0-31.

But I suspect the nonprinting characters you are seeing (hmm, an oxymoron?
;-) in the ASCII code range 127-255. You would need to use several
SUBSTITUTE calls to remove each one. It would be better to use a macro. I
believe someone has one; but I didn't find any with a quick Google search.
Or it might be sufficient to replace CODE(160) with a space (" ").

However, bewa some of those values might be printable characters in some
character set. You might want to save a backup copy of the Excel file before
making any changes.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:49 PM.


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