View Single Post
  #1   Report Post  
Bernie Deitrick
 
Posts: n/a
Default

Gary's Student,

That code should have given you an error when you tested it on a multi-cell selection.

HTH,
Bernie
MS Excel MVP


"Gary's Student" wrote in message
...
Assuming you want to pre-pad selected cells with three spaces, try:

Sub padit()
Dim r As Range
Set r = Selection
r.Value = " " & r.Value
End Sub

--
Gary's Student


"John Grossman" wrote:

How do I do F2 - home - add 3 spaces and enter.
Don't want it to carry over name I'm editing - each row different