Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
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!! |
#2
![]() |
|||
|
|||
![]()
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!! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
automatic macro update | Excel Worksheet Functions | |||
Date macro | Excel Discussion (Misc queries) | |||
Can't get simple macro to run | Excel Worksheet Functions | |||
Macro and If Statement | Excel Discussion (Misc queries) | |||
Macro Formula revision? | Excel Worksheet Functions |