Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Worksheet Functions / June 2007

Tip: Looking for answers? Try searching our database.

Hard return

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ttribble - 19 Jun 2007 01:31 GMT
Does any one out there know how to remove a lot of hard returns from multiple
cells
Gord Dibben - 19 Jun 2007 01:50 GMT
Usually Edit>Replace works on the selection if the hard return is generate by
Alt + Enter in a cell.

What:  CTRL + j

With:  nothing

Replace all.

If generated by CHAR(10) in a formula, copy>paste special>values first.

Gord Dibben  MS Excel MVP

>Does any one out there know how to remove a lot of hard returns from multiple
>cells
Dave Peterson - 19 Jun 2007 01:57 GMT
Or replace it with a space character?

(just in case <vbg>)

> Usually Edit>Replace works on the selection if the hard return is generate by
> Alt + Enter in a cell.
[quoted text clipped - 11 lines]
> >Does any one out there know how to remove a lot of hard returns from multiple
> >cells

Signature

Dave Peterson

Gord Dibben - 19 Jun 2007 04:33 GMT
I just never remember to add that piece of info<g>

Thanks,          Gord

>Or replace it with a space character?
>
[quoted text clipped - 15 lines]
>> >Does any one out there know how to remove a lot of hard returns from multiple
>> >cells
Rick Rothstein (MVP - VB) - 19 Jun 2007 01:57 GMT
> Does any one out there know how to remove a lot of
> hard returns from multiple cells

You could run a macro similar to this (change the indicated range as
needed)....

      Dim C As Range
      For Each C In Range("b1:f3")
        C.Value = Replace(C.Value, vbLf, " ")
      Next

and then save the worksheet afterwards. The above macro removes each Line
Feed (what you are calling a "hard return") and replaces them with a single
blank space.

Rick
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.