LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Clear a Carriage Return from a String Value

Hi,

The CLEAN worksheet function removes all non printable characters, try
something like this

Sub CarriageRtn()
Dim cell As Range
For Each cell In Selection
cell.Value = Application.WorksheetFunction.Clean(cell.Value)
Next cell

End Sub

Select the problem cells and run the macro


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Carriage return CWH Excel Discussion (Misc queries) 1 March 16th 10 01:54 PM
Carriage Return Problem Don L[_2_] Excel Discussion (Misc queries) 1 March 12th 10 07:04 PM
Carriage return during an if statement kpt Excel Discussion (Misc queries) 2 May 15th 09 05:31 PM
Can I insert 'carriage/line returns' in text string? DC-Frank Excel Worksheet Functions 1 June 16th 08 04:54 PM
Carriage Return Freddo Excel Worksheet Functions 2 March 22nd 07 10:34 AM


All times are GMT +1. The time now is 08:40 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"