Carriage Return
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. |
Carriage Return
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. |
Carriage Return
Thanks, the macro was exactly what I was looking for with
a couple of modifications. -----Original Message----- 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 . |
All times are GMT +1. The time now is 05:57 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com