Re: Small square in the cells of CSV files - Text to column

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Tom Ogilvy (twogilvy_at_msn.com)
Date: 02/12/05


Date: Sat, 12 Feb 2005 09:58:31 -0500

That would assume that the character has an ascii code of 3.

You can examine what codes are there with

Sub Checkcode()
Dim sChr As String, sSTr As String
  For i = 1 To Len(ActiveCell.Text)
   sChr = Mid(ActiveCell.Text, i, 1)
   sSTr = sSTr & Asc(sChr) & "-" & sChr & vbNewLine
  Next
 MsgBox sSTr
End Sub

Note that you probably won't see the small square, but you should see a
number without a printable character next to it. You would replace chr(3)
with chr(that number)

You would could also try the worksheet function CLEAN.

-- 
Regards,
Tom Ogilvy
"Robert Christie" <anonymous@discussions.microsoft.com> wrote in message
news:40D7E146-A0F3-4C36-BCCC-A706392391B8@microsoft.com...
> Hi Hari
>
> I had the same problem, Tom Ogilvy said use this line of code to remove it
>
>     Cells.Replace What:=Chr(3), Replacement:="", lookat:=xlPart
>
> HTH
>
> Regards Aussie Bob C.
>
> "Hari Prasadh" wrote:
>
> > Hi,
> >
> > I have got some data from my client (in CSV format) and one of the
columns
> > has a small square at the end. Also, many of the cells in that column
> > contain extra lines in them (just like Alt+Enter).
> >
> > I used Trim function on this column but neither the square nor the extra
> > lines are getting removed.
> >
> > I tried Text to columns with fixed width and NO break line thinking that
> > this might remove the lines or extra lines but it didnt.
> >
> > In Text to columns with Delimiter selected as TAB it worked (It seemed
so).
> > Just wanted to know what this small square is. Is it equivalent to TAB?
> > And is the method of text to columns with delimiter being tab a SAFE way
to
> > clean data of above mentioned type?
> >
> > Thanks a lot,
> > Hari
> > India
> >
> >
> >


Relevant Pages

  • RE: How to make the gridlines of a chart square
    ... In words, when I do first time transformation (to make grid square), I ... > The problem is that I don't get square gridlines. ... > Dim Z1 As Double ... > Function DerivativeZ(func As String, a As Double, V As String) As Double ...
    (microsoft.public.excel.charting)
  • Re: image rsesizer
    ... Any one has any methode to resize the image in certain width and the ... //De nieuwe hoogte berekenen aan de gegevens van het oude plaatje en ... setTargetdir(string string) ... Makes the image a square ...
    (alt.php)
  • Re: Manual hashing
    ... I'm using the string "mokkongshen" as an example. ... frequent characters to single digits and less frequent characters to ... Write this number sequence in the smallest square it fits. ...
    (sci.crypt)
  • Re: Trim Function
    ... > little square. ... > Dim TotLen As Integer, MyText As String, MyBkmrk As String ... You have to check for the last character after trimming it (Which might not ... Dim MyCell As Cell ...
    (microsoft.public.word.vba.beginners)