Fill Down based on count in another sheet

L

LostInNY

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.
 
O

ozgrid.com

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
 
L

LostInNY

Works great Dave Thanks!!

ozgrid.com said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top