Remove "Alt Enter" blank space

J

JulieD

Hi

one way

Sub removealtenter()
For Each c In Range("A1:A10")
c.Value = Application.WorksheetFunction.Substitute(c.Value, Chr(10),
" ")
Next
End Sub

Cheers
JulieD
 
D

Dave Peterson

Non-macro.

edit|replace
what: (hit and hold the alt key and type 0010 from the numeric keypad)
with: (leave blank or a spacebar???)
replace all

It may not look like that alt-0010 did anything, but try it. It'll work.

As a formula:

=substitute(a1,char(10),"")
or
=substitute(a1,char(10)," ")

If you want a space character.
 
D

Dave Peterson

Ah, VBA.

Never mind.

Dave said:
Non-macro.

edit|replace
what: (hit and hold the alt key and type 0010 from the numeric keypad)
with: (leave blank or a spacebar???)
replace all

It may not look like that alt-0010 did anything, but try it. It'll work.

As a formula:

=substitute(a1,char(10),"")
or
=substitute(a1,char(10)," ")

If you want a space character.
 
C

crapit

Wat abt removing it from a 2nd "Alt-Enter" only?
JulieD said:
Hi

one way

Sub removealtenter()
For Each c In Range("A1:A10")
c.Value = Application.WorksheetFunction.Substitute(c.Value,
Chr(10), " ")
Next
End Sub

Cheers
JulieD
 
J

JulieD

you're welcome .. check out the substitute function either in VBA or normal
excel help ... it will show how to do this.

Cheers
JulieD
 

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