Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Mar 21, 12:26*pm, joel wrote:
The return in the cell is code as an ascii character Linefeed which is a 10. In the code below I set a variable to character 10. *You can also use vblf. *You can use any string method with the linefeed like REPLACE to remove the character or replace the character with other characters LF = Chr(10) or LF = vbLF with Set c = .Columns("A").Find(what:=LF, _ LookIn:=xlValues, lookat:=xlPart) if not c is nothing FirstAddr = c.address do c = replace(c,LF, " *") set c = .Columns("A").findnext(after:=c) while not c is nothing and c.address < FirstAddr end if end with The code below is complicated. *I just wanted to show a couple of different methods. *I don't know how many cells you are trying to replce the Linefeed with two spaces. *You can achieve the same thing as follows LF = vbLF with sheets("sheet1") .columns("A").replace(LF," *") end with -- joel ------------------------------------------------------------------------ joel's Profile: 229 View this thread:http://www.thecodecage.com/forumz/sh...d.php?t=189290 http://www.thecodecage.com/forumz/chat.php Hi Joel, great help. Thank you very much for your professional advice. It works as desired. Regards, Andreas |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Alt-Enter Line Breaks | Excel Discussion (Misc queries) | |||
Removing Manual Line Breaks in Multiple Cells | Excel Discussion (Misc queries) | |||
Remove Manual Line Breaks in Cell | Excel Discussion (Misc queries) | |||
How do I insert manual line breaks in excel? | Excel Worksheet Functions | |||
manual line breaks | Excel Discussion (Misc queries) |