Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default Fill Down based on count in another sheet

I am using the following in Excel to copy a formula:

ThisWorkbook.Worksheets("Results 4").Range("3:2000").FillDown

I need to only copy the formula for a certain number of rows up to 2000.
The number of rows I need is based on the number of rows I have in worksheet
"Results Data" in column A. So, if "Results Data" has data in column A2:A16,
I will need to copy down the formula for all columns in worksheet "Results 4"
to column 17.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 464
Default Fill Down based on count in another sheet

Sub FillFown()
Dim lStop As Long

With Worksheets("Results Data")
lStop = .Cells(.Rows.Count, "A").End(xlUp).Row
End With
Worksheets("Results 4").Range("3:" & lStop).FillDown
End Sub



--
Regards
Dave Hawley
www.ozgrid.com
"LostInNY" wrote in message
...
I am using the following in Excel to copy a formula:

ThisWorkbook.Worksheets("Results 4").Range("3:2000").FillDown

I need to only copy the formula for a certain number of rows up to 2000.
The number of rows I need is based on the number of rows I have in
worksheet
"Results Data" in column A. So, if "Results Data" has data in column
A2:A16,
I will need to copy down the formula for all columns in worksheet "Results
4"
to column 17.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default Fill Down based on count in another sheet

Works great Dave Thanks!!

"ozgrid.com" wrote:

Sub FillFown()
Dim lStop As Long

With Worksheets("Results Data")
lStop = .Cells(.Rows.Count, "A").End(xlUp).Row
End With
Worksheets("Results 4").Range("3:" & lStop).FillDown
End Sub



--
Regards
Dave Hawley
www.ozgrid.com
"LostInNY" wrote in message
...
I am using the following in Excel to copy a formula:

ThisWorkbook.Worksheets("Results 4").Range("3:2000").FillDown

I need to only copy the formula for a certain number of rows up to 2000.
The number of rows I need is based on the number of rows I have in
worksheet
"Results Data" in column A. So, if "Results Data" has data in column
A2:A16,
I will need to copy down the formula for all columns in worksheet "Results
4"
to column 17.


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
Count if based on criteria within cells on another sheet --Viewpoint Excel Discussion (Misc queries) 1 August 21st 09 10:01 PM
Fill Cells Based On Cells In Another Sheet [email protected] Excel Worksheet Functions 1 May 31st 07 10:30 PM
Count down with auto fill? Chris Excel Worksheet Functions 4 August 22nd 06 12:43 AM
Is there a way to count cells in a range based on fill color? eehinmd Excel Worksheet Functions 2 March 16th 06 05:09 PM
Count nonblank AND fill color Purseus Excel Worksheet Functions 1 August 17th 05 07:13 PM


All times are GMT +1. The time now is 11:41 PM.

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"