Hello,
I am trying to figure out the code needed to autofill a column to the last row of data. The macro will be used on a standard report that will have various rows of data. Below is what I currently have. I am looking to autofill columns X through AJ and stop at the last row of data. When I created the macro, it had 19280 rows. I can edit it each month or simply use a greater number and filter out the blanks in the pivot table, but I rather have the code produce a report that people do not need to edit or do another step.
Range("X2:AJ2").Select
Selection.AutoFill Destination:=Range("X2:AJ19280")
Range("X2:AJ19280").Select
Range("X2").Select
I am trying to figure out the code needed to autofill a column to the last row of data. The macro will be used on a standard report that will have various rows of data. Below is what I currently have. I am looking to autofill columns X through AJ and stop at the last row of data. When I created the macro, it had 19280 rows. I can edit it each month or simply use a greater number and filter out the blanks in the pivot table, but I rather have the code produce a report that people do not need to edit or do another step.
Range("X2:AJ2").Select
Selection.AutoFill Destination:=Range("X2:AJ19280")
Range("X2:AJ19280").Select
Range("X2").Select