D
Dino
Hello,
I have a procedure that perform often that I would like to convert into a
function called "DASHES". All it does is take a 10-digit number in a cell and
insert dashes into the appropriate places, and save the result. I did a macro
to get the code, but I don't know how to turn this into a function that will
be available every time I use my copy of Excel. Here is the code:
Sub DASHES()
'
' DASHES Macro
' Macro recorded 10/15/2008 by Dino
'
ActiveCell.FormulaR1C1 = _
"=LEFT(RC[-1],4)&""-""&MID(RC[-1],5,3)&""-""&RIGHT(RC[-1],3)"
Range("C3").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
End Sub
Any help would be appreciated, thanks!
I have a procedure that perform often that I would like to convert into a
function called "DASHES". All it does is take a 10-digit number in a cell and
insert dashes into the appropriate places, and save the result. I did a macro
to get the code, but I don't know how to turn this into a function that will
be available every time I use my copy of Excel. Here is the code:
Sub DASHES()
'
' DASHES Macro
' Macro recorded 10/15/2008 by Dino
'
ActiveCell.FormulaR1C1 = _
"=LEFT(RC[-1],4)&""-""&MID(RC[-1],5,3)&""-""&RIGHT(RC[-1],3)"
Range("C3").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
End Sub
Any help would be appreciated, thanks!