Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
REMOVE EMPTY LINES IN EXCEL CELL
I need to remove the empty lines from individual cells (not remove entire rows)
----- ROW1 ----- to ----- ROW1 ----- |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
REMOVE EMPTY LINES IN EXCEL CELL
Try this
Option Explicit Sub test() Dim aWS As Excel.Worksheet Dim r As Excel.Range Dim myText As String Set aWS = ActiveSheet For Each r In aWS.UsedRange myText = Right(r.Text, 1) If myText = Chr(10) Then r.Value = Left(r.Text, Len(r.Text) - 1) End If Next r End Sub HTH, Barb Reinhardt "steve r" wrote: I need to remove the empty lines from individual cells (not remove entire rows) ----- ROW1 ----- to ----- ROW1 ----- |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
HOW DO I REMOVE/DELETE LINES IN EXCEL? | Excel Discussion (Misc queries) | |||
How do I remove lines through text in excel | Excel Discussion (Misc queries) | |||
How to remove empty spaces in a cell with numbers? | Excel Worksheet Functions | |||
In excel, how do I remove unwanted lines for printing | Excel Discussion (Misc queries) | |||
Remove empty rows in excel? | Excel Discussion (Misc queries) |