Hi, I'm trying to figure out how to autofill/filldown a range in which the number of rows may change periodically. I'm using a variable to store the number of rows counted, but don't know how to incorporate that variable into the autofill/filldown. Here is a sample of my code:
Range("K2").Select
Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select
Dim totalrows As Integer
Dim f As Integer
totalrows = ActiveSheet.UsedRange.Rows.Count
f = totalrows - 2 'account for header/footer rows
Worksheets("Sheet1").Range("A2:J"f"").FillDown
Thanks for any help!
Range("K2").Select
Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select
Dim totalrows As Integer
Dim f As Integer
totalrows = ActiveSheet.UsedRange.Rows.Count
f = totalrows - 2 'account for header/footer rows
Worksheets("Sheet1").Range("A2:J"f"").FillDown
Thanks for any help!