PC Review


Reply
Thread Tools Rate Thread

How to delete a "return" character (a "box") in cell of imported d

 
 
JaxHBT
Guest
Posts: n/a
 
      12th Aug 2008
When I download contact address information from Outlook to an XL file, many
times there appears a square 'box' character in the cell where either (a) a
comma would have been separating street from say, suite # in the same line or
(b) where a return would have been (street address <return> city/state/zip)
in the address card (and sometimes more than one "box" for multiple
returns). I have tried to search and replace to change or delete the
character, but I am unable to grab it, and thus have to manually adjust each
cell. A daunting task with 4000+ entries....

The "box" character only appears in the formula field bar -- when viewing the
cell in the sheet, it appears as two vertical lines (like a double lower case
L).

What is this character called how do I get rid of it globally in the sheet
??? Thx

 
Reply With Quote
 
 
 
 
Dave Peterson
Guest
Posts: n/a
 
      12th Aug 2008
Chip Pearson has a very nice addin that will help determine what that
character(s) is:
http://www.cpearson.com/excel/CellView.aspx

You may be able to use Edit|Replace to change the character--Some characters can
be entered by holding the alt-key and typing the hex number on the numeric
keypad. For example, alt-0010 (or ctrl-j) can be used for linefeeds. But I've
never been able to get alt-0013 to work for carriage returns.

Another alternative is to fix it via a formula:

=substitute(a1,char(##),"")
or
=substitute(a1,char(##)," ")

Replace ## with the ASCII value you see in Chip's addin.

Or you could use a macro (after using Chip's CellView addin):

Option Explicit
Sub cleanEmUp()

Dim myBadChars As Variant
Dim myGoodChars As Variant
Dim iCtr As Long

myBadChars = Array(Chr(##), Chr(##)) '<--What showed up in CellView?

myGoodChars = Array(" ","") '<--what's the new character, "" for nothing?

If UBound(myGoodChars) <> UBound(myBadChars) Then
MsgBox "Design error!"
Exit Sub
End If

For iCtr = LBound(myBadChars) To UBound(myBadChars)
ActiveSheet.Cells.Replace What:=myBadChars(iCtr), _
Replacement:=myGoodChars(iCtr), _
LookAt:=xlPart, SearchOrder:=xlByRows, _
MatchCase:=False
Next iCtr

End Sub

If you're new to macros:

Debra Dalgleish has some notes how to implement macros here:
http://www.contextures.com/xlvba01.html

David McRitchie has an intro to macros:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Ron de Bruin's intro to macros:
http://www.rondebruin.nl/code.htm

(General, Regular and Standard modules all describe the same thing.)

JaxHBT wrote:
>
> When I download contact address information from Outlook to an XL file, many
> times there appears a square 'box' character in the cell where either (a) a
> comma would have been separating street from say, suite # in the same line or
> (b) where a return would have been (street address <return> city/state/zip)
> in the address card (and sometimes more than one "box" for multiple
> returns). I have tried to search and replace to change or delete the
> character, but I am unable to grab it, and thus have to manually adjust each
> cell. A daunting task with 4000+ entries....
>
> The "box" character only appears in the formula field bar -- when viewing the
> cell in the sheet, it appears as two vertical lines (like a double lower case
> L).
>
> What is this character called how do I get rid of it globally in the sheet
> ??? Thx


--

Dave Peterson
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Field Names: "LongName", "ShortName", "Code", "Description","Comments" PeteCresswell Microsoft Access 2 25th Feb 2009 11:41 PM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Microsoft Excel Misc 2 8th Aug 2008 01:54 AM
<FORM METHOD="post" onSubmit="return fieldcheck()" name="orientation" action="http://ws-kitty.BU.edu/AT/survey/orientation/script/write.asp" language="JavaScript"> Joeyej Microsoft ASP .NET 0 4th Jun 2004 08:55 PM
Replace imported "hard return" box character with non-box return Jim Microsoft Excel Worksheet Functions 3 15th Apr 2004 04:56 PM
Why CELL("format",A1) doesn't return something like "#.##"? ...and other rants Raymond Zeitler Microsoft Excel Discussion 2 13th Apr 2004 06:30 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:05 PM.