Macro problem

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...
 
J

Jonathan Rynd

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

What is the error?
 

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

Similar Threads


Top