My code errors at the AUTOFILL method line. Do I have a syntax error somewhere.
Code:
'Continued Formatting CB IMPACT
lastRow = sht.Range("A" & sht.Rows.Count).End(xlUp).Row
sht.Range("V3").Select
ActiveCell.FormulaR1C1 = "new cb"
sht.Range("W3").Select
ActiveCell.FormulaR1C1 = "cb impact"
sht.Range("V4").Select
ActiveCell.FormulaR1C1 = "=RC[-1]-RC[-5]"
sht.Range("G1").Select
ActiveCell.FormulaR1C1 = "=SUMIF(C[16],"">0"")"
sht.Range("G2").Select
ActiveCell.FormulaR1C1 = "=R[-1]C*0.25"
sht.Range("W4").Select
ActiveCell.FormulaR1C1 = "=(RC[-1]-(RC[-11]-RC[-12]))*RC[-21]"
sht.Range("V4").Select
[B] sht.Range("V4").AutoFill Destination:=sht.Range("V4:V" & lastRow), Type:=xlFillDefault[/B]
sht.Range("W4").Select
sht.Range("W4").AutoFill Destination:=sht.Range("W4:W" & lastRow), Type:=xlFillDefault
sht.Columns("V:W").Select
Selection.EntireColumn.Hidden = True