#1   Report Post  
glee
 
Posts: n/a
Default autofill macro

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   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!!


Reply
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
automatic macro update boconnell Excel Worksheet Functions 4 February 9th 05 07:10 PM
Date macro Hiking Excel Discussion (Misc queries) 9 February 3rd 05 12:40 AM
Can't get simple macro to run Abi Excel Worksheet Functions 5 January 12th 05 07:37 PM
Macro and If Statement SATB Excel Discussion (Misc queries) 2 December 3rd 04 04:46 PM
Macro Formula revision? Mark Excel Worksheet Functions 1 November 28th 04 01:43 AM


All times are GMT +1. The time now is 06:43 AM.

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"