Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
special character - line feed
How can I find a line-feed (alt + Enter) in a text cell in Excel and replace it with a space. When we save our Excel data to .csv and upload, our application bombs with this special character.
|
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
special character - line feed
-----Original Message----- How can I find a line-feed (alt + Enter) in a text cell in Excel and replace it with a space. When we save our Excel data to .csv and upload, our application bombs with this special character. . Chris Something like this Sub Macro1() Dim x Dim c As Variant x = Chr(10) For Each c In Selection c.Replace What:=x, Replacement:=" ", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=False Next c End Sub Regards Peter |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
special character - line feed
replace works on a range, why do selection.count -1 useless loops.
Sub Macro1() Cells.Replace What:=Chr(10), Replacement:=" ", _ LookAt:=xlPart, SearchOrder:=xlByRows, _ MatchCase:=False End Sub -- Regards, Tom Ogilvy "Peter atherton" wrote in message ... -----Original Message----- How can I find a line-feed (alt + Enter) in a text cell in Excel and replace it with a space. When we save our Excel data to .csv and upload, our application bombs with this special character. . Chris Something like this Sub Macro1() Dim x Dim c As Variant x = Chr(10) For Each c In Selection c.Replace What:=x, Replacement:=" ", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=False Next c End Sub Regards Peter |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Challenge - Excel Line Feed Character CHR(10) - How to Delete and keep the text formatting without going ro single line in a cell ? | Excel Worksheet Functions | |||
Fonts & Line Feed in a Cell | Excel Discussion (Misc queries) | |||
Life Feed character | Excel Worksheet Functions | |||
Replace Line Feed | Excel Discussion (Misc queries) | |||
How to put line feed in a cell using a character not Alt/Enter | Excel Discussion (Misc queries) |