View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson[_3_] Dave Peterson[_3_] is offline
external usenet poster
 
Posts: 2,824
Default Carriage Return

I've never had real good luck using alt-0013 in the Replace dialog. (alt-0010
work fine, though.)

I've always used an extra helper cell and a worksheet formula:
=substitute(a1,char(13),"")

or a macro:
Option Explicit
Sub testme()
With worksheets("sheet1")
.Cells.Replace What:=Chr(13), Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False
End With
End Sub

Tom Ogilvy wrote:

that should have been 0013 rather than 0010 for the replace what.

--
Regards,
Tom Ogilvy

"Tom Ogilvy" wrote in message
...
first, have you formatted the cells to wordwrap?

If you wordwrap the cells, Char(10)/vbLf will not appear as a box and will
cause a hard return

Char(13)/vbCr will show as a box and is not needed.

You can try selecting the cells and doing

Edit=Replace

Replace What : hold down the right alt key and using the numeric keypad
enter 0010

Replace With: leave this blank.

--
Regards,
Tom Ogilvy


"Lynn" wrote in message
...
I have a worksheet in which carriage and line returns show
as square characters. Does anyone have a macro that will
go through the worksheet and replace every instance with
vblf or vbCrLf.





--

Dave Peterson