Thread: autofill macro
View Single Post
  #2   Report Post  
Gord Dibben
 
Posts: n/a
Default

glee

Sub Auto_Fill()
Dim lrow As Long
With ActiveSheet
lrow = Range("C" & Rows.Count).End(xlUp).Row
Range("C1:C" & lrow).FillDown
End With
End Sub

Or perhaps.......

Sub selectrange1()
Range(ActiveCell, Cells(Rows.Count, ActiveCell.Column).End(xlUp)).Select
Selection.FillDown
End Sub


Gord Dibben Excel MVP

On Mon, 14 Feb 2005 08:21:03 -0800, "glee"
wrote:

I am trying to make a macro that will autofill a formula to the end of a
column. However, the column is different lengths in each workbook. I
autofilled to the end of the column in the first worksheet, which was 1124
cells long. Then in my next worksheet, the length was 2264 cells long, and
it only autofilled to cell 1124. Is there anyway that I could autofill to
the "end" of each column in each worksheet? Is there anyway that excel knows
when to stop? Please help!!