Macro problem

  • Thread starter Thread starter dpilkington
  • Start date Start date
D

dpilkington

I am trying to create a macro that will select a cell, format it with
function like =proper and then autofill the range.

Example is I have a list of customer names that I want to make prope
case. I want the macro to format the entire list for me.

Below is the edited macro script and the error is on the line:
Selection.AutoFill Destination:=Range("C6:C8"), Type:=xlFillDefault


Sub CommaRemoval()
'
' CommaRemoval Macro
' Remove commas and place a space in it's place.
'
' Keyboard Shortcut: Ctrl+Shift+C
'
ActiveCell.FormulaR1C1 = "=SUBSTITUTE(RC[-2],"","","" "")"
Selection.AutoFill Destination:=Range("C6:C8")
Type:=xlFillDefault
Range("C6:C8").Select
Selection.Copy
Range("A6").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone
SkipBlanks _
:=False, Transpose:=False
Range("C6:C8").Select
Application.CutCopyMode = False
End Sub


I did not create the script. I created the macro via the record macr
function.

Hellllllppppppppppppp...
 
Back
Top