LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VBA code to Autofill one cell to many rows below where row count will change

Sub AutoFillDateLookups()
Dim DataRange As Range
Dim CopyRange As Range
Dim FillRange As Range
Set DataRange = Range("ClassCountRevenue")
Set CopyRange = Range("F2")
Set FillRange = CopyRange.Offset(1, 0).Resize(DataRange.Rows.Count,
0).Select
CopyRange.AutoFill Destination:=Range(FillRange)
End Sub

I am attempting to AutoFill a range of values from one cell (F2) to a
range of cells below where the number of rows will vary from month to
month.

In the example above, I have set the datarange to capture the total
rows/columns in the data table. I set the copy range to the starting
cell containing my formula. I can't seem to get the fill range to be
one row down and then resize to the total count of rows in the data
table.

Any help would be much appreciated.

Thanks!
Kimberly

 
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
VBA code to count rows ub Excel Worksheet Functions 5 June 5th 09 03:22 AM
Autofill cell references with a pattern of every 110 rows Light Excel Worksheet Functions 3 October 13th 08 10:00 PM
How do I count rows within a cell? Jouni Kananen Excel Worksheet Functions 3 October 25th 06 01:14 AM
excel deleting rows last cell does not change. How to change? mrubey Excel Discussion (Misc queries) 3 August 25th 05 08:38 PM
run code after cell contents change Brian Excel Programming 0 September 5th 03 08:37 PM


All times are GMT +1. The time now is 10:58 AM.

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

About Us

"It's about Microsoft Excel"