Home |
Search |
Today's Posts |
#8
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How can I remove a header in a Spreadsheet | Excel Discussion (Misc queries) | |||
How do I remove a constant from an excel spreadsheet? | Excel Discussion (Misc queries) | |||
can an excel spreadsheet be set to remove all hyperlinks | Excel Worksheet Functions | |||
Remove macros from spreadsheet | Excel Discussion (Misc queries) | |||
removing squares and lines in squares that really should be paragr | Excel Discussion (Misc queries) |