Autofill Destination range open

  • Thread starter Thread starter J.W. Aldridge
  • Start date Start date
J

J.W. Aldridge

recorded this line in a macro....

Need for this to read as an open range instead of stopping at F784.
Will always start at A2- F2 but last row (F784) may change..


Selection.AutoFill Destination:=Range("A2:F784")
 
To find the last row based on F

iLastRow=Range("F65536").end(xlup).row
Then you substitute in your instruction:
Selection.AutoFill Destination:=Range("A2:F" & iLastRow)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top