View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Dana DeLouis[_3_] Dana DeLouis[_3_] is offline
external usenet poster
 
Posts: 690
Default How to transfer the length of one column to a formula in Visual ba

Here's a slightly different approach similar to Dave's excellent idea.

Sub Demo()
With Range([A2], Cells(Rows.Count, "A").End(xlUp))
[J2].Resize(.Rows.Count).FillDown
End With
End Sub

--
Dana DeLouis
Win XP & Office 2003


"Kanga 85" wrote in message
...
I have a column A of variable length (say 100 cells). I have a formula in
J2
which I wish to pull down for that number of cells.

Range ("J2").Select
Selection.Autofill Destination:=Range("J2:J101"), Type:=xlFillDefault.

How do I get the length of Column A to replace the term 'J101' in this
formula?

Thanks