Thread: autofill range
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Dana DeLouis[_3_] Dana DeLouis[_3_] is offline
external usenet poster
 
Posts: 690
Default autofill range

I assume here that your "data range" is 1 column to the left.

Sub Demo()
With [F4].Offset(0, -1)
With Range(.Address, .End(xlDown)).Offset(0, 1)
.Cells(1).FormulaR1C1 = "=NETWORKDAYS(R1C5,RC[-1])"
.FillDown
End With
End With
End Sub

--
Dana DeLouis
Using Windows XP & Office XP
= = = = = = = = = = = = = = = = =


"Stephen" wrote in message
...
I have a formula in cell F4 that i want to copy down to
the end of the data range. the range fluxuates daily. some
days 30 rows..some days 80 rows. so no matter what the row
range the macro automatically fills the formula down to
the bottom of the range column. Here is what I have so
far. But not working.

Range("F4").Select
ActiveCell.FormulaR1C1 = "=NETWORKDAYS(R1C5,RC[-1])"
Range("F4").Select
Range(ActiveCell, ActiveCell.End(xlDown)).AutoFill