View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
CLR
 
Posts: n/a
Default Recording macros with autofill

I'm afraid that's just the way Excel records that function and you're stuck
unless you want to get into the VB Editor and edit your macro.

Where the recorded macro would have a line like this.....
Selection.AutoFill Destination:=Range("L8:L1055")

You would have to change it to look like this.....
Selection.AutoFill Destination:=Range("L8:L" & _
Cells(Rows.Count, 1).End(xlUp).Row)

If you want to try this, be sure to do so on a copy of your file in case of
things happening that you didn't want to have happen..........

hth
Vaya con Dios,
Chuck, CABGx3




"andyiain" wrote:


Hi,

I've oft have occasion to record macros, yet I'm not very good so...

How do you do the equivalent of auto-fill a column by double clicking
the bottom right hand corner of a cell. When I do this in a macro I
record, rather than record the auto-fill of a series of data for the
length of data it puts in the range that should be auto-filled. It
means that if i use the macro again on a sheet with a different amount
of data I'll get missing results of cell errors.

Any help would be appreciated.

Andy


--
andyiain
------------------------------------------------------------------------
andyiain's Profile: http://www.excelforum.com/member.php...fo&userid=8335
View this thread: http://www.excelforum.com/showthread...hreadid=552698