PC Review


Reply
Thread Tools Rate Thread

Autofill Destination range open

 
 
J.W. Aldridge
Guest
Posts: n/a
 
      3rd Nov 2008
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")
 
Reply With Quote
 
 
 
 
Michael
Guest
Posts: n/a
 
      3rd Nov 2008
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)
--
If this posting was helpful, please click on the Yes button.
Regards,

Michael Arch.




"J.W. Aldridge" wrote:

> 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")
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
autofill without a destination range Peruanos72 Microsoft Excel Programming 7 12th Mar 2009 03:48 AM
Range("B2").AutoFill Destination:=Range("GX1", ActiveCell) ... Fails but why? Shaka215@gmail.com Microsoft Excel Programming 2 13th Mar 2007 12:10 PM
Range("B2").AutoFill Destination:=Range("GX1", ActiveCell) ... Fails but why? Shaka215@gmail.com Microsoft Excel Programming 0 13th Mar 2007 02:22 AM
Selection.Autofill Destination:=Range(ActiveCell.Value) Shaka215@gmail.com Microsoft Excel Programming 6 23rd Apr 2006 11:15 PM
Help with "Autofill" Destination Range Joe MacPherson Microsoft Excel Programming 0 6th May 2004 06:03 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:10 AM.