DataSeries Method

W

William

Hi Michael

Sub test()
Range("D2") = 1
Range("D2").AutoFill Destination:=Range("D2:D39"), Type:=xlFillSeries
End Sub


--
XL2002
Regards

William

[email protected]

| I am trying the fill a range with a progression 1,2,3,4 etc using the
| DataSeries method. What is the syntax?
|
| Thanks,
| Mike
|
|
 
J

JE McGimpsey

When I recorded a macro to do this I got:

Range("A1").Select
Selection.AutoFill Destination:=Range("A1:A21"), Type:=xlFillSeries

The selections aren't necessary:

Range("A1").AutoFill Destination:=Range("A1:A21"), Type:=xlFillSeries


or, if your range is in a variable:

With rng
.Cells(1, 1).AutoFill Destination:=.Cells, Type:=xlFillSeries
End With
 
M

Michael Allen

I am trying the fill a range with a progression 1,2,3,4 etc using the
DataSeries method. What is the syntax?

Thanks,
Mike
 
Top