DataSeries Method

  • Thread starter Thread starter William
  • Start date Start date
W

William

Hi Michael

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


--
XL2002
Regards

William

(e-mail address removed)

| 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
|
|
 
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
 
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
 
Thanks William for the very prompt response. That worked fine!

Mike
 

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

Back
Top