Sub AutoDrag()
'
' AutoDrag Macro
'
'
ActiveCell.FormulaR1C1 = "=ABS(CD_4[@N1]-R[-2]C[-9])"
Range("L1468").Select
Selection.AutoFill Destination:=Range("L2:L1468"), Type:=xlFillDefault
Range("L2:L1468").Select
Sheets("ROC").Select
Cells.Select
Selection.Copy
Sheets.Add After:=ActiveSheet
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
With Selection
.HorizontalAlignment = xlRight
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Sheets("Corp").Select
Range("L30").Select
Selection.End(xlDown).Select
ActiveCell.FormulaR1C1 = "=ABS(CD_4[@N1]-R[-3]C[-9])"
Range("L1468").Select
Selection.AutoFill Destination:=Range("L2:L1468"), Type:=xlFillDefault
Range("L2:L1468").Select
Sheets("ROC").Select
Selection.Copy
Sheets.Add After:=ActiveSheet
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
With Selection
.HorizontalAlignment = xlRight
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Sheets("Corp").Select
Range("L20").Select
Selection.End(xlDown).Select
ActiveCell.FormulaR1C1 = "=ABS(CD_4[@N1]-R[-4]C[-9])"
Range("L1468").Select
Selection.AutoFill Destination:=Range("L2:L1468"), Type:=xlFillDefault
Range("L2:L1468").Select
Sheets("ROC").Select
Selection.Copy
Sheets.Add After:=ActiveSheet
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
With Selection
.HorizontalAlignment = xlRight
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
End Sub