HI,
I am trying to generate an autofill option.
Need to do it on VBA. can you pls correct this code?
The problem is I can select the entire column but cant autofill the other percentage cells using macro.
here is the code:
Sub percentage_col()
Dim LastRow As Long
With Worksheets("Sheet6")
LastRow = .Cells(Rows.Count, "A").End(xlUp).Row
Range("F2:F" & LastRow).Select
Range("F2").Select
ActiveCell.FormulaR1C1 = "=(RC[-4]/RC[-2])*100"
Selection.AutoFill Destination:=Range("F2:F5000"), Type:=xlFillDefault
End With
Range("F2:F" & LastRow).Select
End Sub
Bookmarks