Try something like
Dim RowCounter As Long
RowCounter = Range("G1").Value
Selection.AutoFill Destination:=Range(Range("A1"), Cells(RowCounter, "A"))
--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
(email address is on the web site)
"Wendy" wrote in message
...
Hi
I'm trying to autofill a column using Selection.AutoFill Destination:=
Range(A1, rowcounter)
where rowcounter = Application.Sheets(2).Range("G1").value
G1 is =CountA(A:A)
The rowcounter has the correct rownumber in it but the auto fill fails
with
Method 'Range' of object '_global' failed
What I am doing is using a formula to put the contents of column B with
some
additions into column A. It works using
Selection.AutoFill Destination:=
ActiveCell.Range(Selection,Selection.End(x1Down)), Type:=_
x1FillValues
but it fills down to 65536 there are only 1210 rows of data this time.
Thanks
Wendy