LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Autofill Destination range open


The suggestion in the previous reply is not fool proof in all versions
of Excel 5 & later

And it assumes column A has an entry in the last used row
try replacing
iLastRow=Range("F65536").end(xlup).row

with this code which finds last used row on sheet

lLR=Cells.Find(what:="*", SearchOrder:=xlByRows, _
SearchDirection:=xlPrevious).Row
range("a2:f2").AutoFill Destination:=Range("A2:F" & lLR)


--
mudraker
------------------------------------------------------------------------
mudraker's Profile: http://www.thecodecage.com/forumz/member.php?userid=18
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=24702

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Range("B2").AutoFill Destination:=Range("GX1", ActiveCell) ... Fails but why? [email protected] Excel Programming 2 March 13th 07 12:10 PM
Range("B2").AutoFill Destination:=Range("GX1", ActiveCell) ... Fails but why? [email protected] Excel Programming 0 March 13th 07 02:22 AM
Range("B2").AutoFill Destination:=Range("GX1", ActiveCell) ... Fails but why? [email protected] Excel Programming 0 March 13th 07 02:16 AM
Selection.Autofill Destination:=Range(ActiveCell.Value) [email protected] Excel Programming 6 April 23rd 06 11:15 PM
Help with "Autofill" Destination Range Joe MacPherson Excel Programming 0 May 6th 04 06:03 PM


All times are GMT +1. The time now is 05:38 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"