Prev: find all instances of a search item and put result in a single cel
Next: Need help with macro for conditional formatting using number forma
From: Cathy Landry on 22 Mar 2010 17:35 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
From: Joe User on 22 Mar 2010 18:45 "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/excel/HP030561311033.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, beware: 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.
From: Cathy Landry on 23 Mar 2010 15:27
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/excel/HP030561311033.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, beware: 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. |