Find and Replace alt enter

D

Darin Kramer

Howdie,

I have a column on which the first line of each cell is the "alt enter"
symbol (ie detail starts on second line within a cell). How do I find
that alt enter charachter and replae it with nothing (ie moving the
second line of text up to the first line of text) within each cell?

Regards
D

*** Sent via Developersdex http://www.developersdex.com ***
 
R

Rick Rothstein

This macro should do what you want, just select the cells you want to apply
it to and then run the macro...

Sub RemoveLeadingAltEnters()
Dim R As Range
For Each R In Selection
If Left(R.Value, 1) = vbLf Then R.Value = Mid(R.Value, 2)
Next
End Sub
 
D

Dave Peterson

If you wanted to get rid of all the alt-enters in a range, you could:

Select the range to fix.
Edit|replace
what: type ctrl-j
with: (space character or leave blank???)
replace all

If you needed a macro, you could record one while you did it manually.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top