Remove "Alt Enter" blank space

  • Thread starter Thread starter crapit
  • Start date Start date
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
 
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.
 
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.
 
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
 
you're welcome .. check out the substitute function either in VBA or normal
excel help ... it will show how to do this.

Cheers
JulieD
 
Back
Top