LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,651
Default how to I remove these odd squares from spreadsheet?

On Sat, 3 May 2008 22:49:56 -0700 (PDT), Joe wrote:

I created a .csv file from an old Palm Desktop application and ended
up with a bunch of these odd squares in many of the cells. I tried to
cut one and paste it into 'find/replace' but it doesn't show up. Aside
from deleting every one of them manually is there a way I can get rid
of them automatically?

Here's a link to a screenshot I took of a couple of cells

http://img176.imageshack.us/my.php?i...squareseu6.jpg


I assume you still want to have the carriage returns, and I am also assuming
that the characters you wish to keep are just the normal ASCII characters.

If so, try this:

After making a backup, select your range of cells, and run the macro below.

To enter the macro, <alt-F11 opens the VB Editor. Ensure your project is
highlighted in the Project Explorer window, then Insert/Module and paste the
code below into the window that opens.

To Run the macro, <alt-F8 opens the macro dialog box. Select the REMnonASCII
macro and <RUN.

======================
Option Explicit
Sub REMnonASCII()
Dim c As Range
Dim re As Object
Set re = CreateObject("vbscript.regexp")
re.IgnoreCase = True
re.Global = True
re.Pattern = "[^ -~]+"
For Each c In Selection
c.Value = re.Replace(c.Value, vbLf)
Next c
End Sub
==========================
--ron
 
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
How can I remove a header in a Spreadsheet Joe from Boca Excel Discussion (Misc queries) 1 January 23rd 06 08:58 PM
How do I remove a constant from an excel spreadsheet? rugby1021 Excel Discussion (Misc queries) 0 January 19th 06 08:50 PM
can an excel spreadsheet be set to remove all hyperlinks lopv Excel Worksheet Functions 2 August 16th 05 03:50 PM
Remove macros from spreadsheet Jan Buckley Excel Discussion (Misc queries) 1 August 12th 05 08:38 PM
removing squares and lines in squares that really should be paragr finnadat Excel Discussion (Misc queries) 5 February 10th 05 11:12 PM


All times are GMT +1. The time now is 01:21 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"