I have a macro which will autofill a sheet down a number of rows based on a value in another cell.

My code is as below. At the moment it will only autofill the series down to the row number of the value in the reference cell. (basically if I have the number 40 on the referenced cell, the code autofills down to row 40 and not down 40 rows which is what I need).

Wondering if someone could help me here.

```
    Range("A8").Select
    Application.CutCopyMode = False
    Selection.AutoFill Destination:=Range("A8:A" & Range("J1").Value), Type:=xlFillSeries
    Range("A8:A104").Select

```

This is part of the code, the code before copies some other info into the sheet.