Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Carriage return | Excel Discussion (Misc queries) | |||
Carriage Return | Excel Worksheet Functions | |||
Hiding carriage return | Excel Discussion (Misc queries) | |||
Carriage return after last column | Excel Discussion (Misc queries) | |||
Strip carriage return, add row | Excel Worksheet Functions |