I used the recorder to auto fill. I noticed that it selected a range. This Macro needs to be universal and by selecting the range (K2:K11669) if the next file has more lines of data it will not autofill all the way to the bottom of the data.
Here is my current code:
Range("K2").Select
Selection.AutoFill Destination:=Range("K2:K11669")
Range("K2:K11669").Select
Range("K2").Select
If the next file has 14,000 lines the code it will stop at 11,669. I am not sure how to write the code properly. Any help would be appreciated. Thanks
Here is my current code:
Range("K2").Select
Selection.AutoFill Destination:=Range("K2:K11669")
Range("K2:K11669").Select
Range("K2").Select
If the next file has 14,000 lines the code it will stop at 11,669. I am not sure how to write the code properly. Any help would be appreciated. Thanks