Link to home
Start Free TrialLog in
Avatar of dabug80
dabug80

asked on

Excel Fill Down VBA Not Working

Hi,

Below is a section of code. Line 10 is giving the following error.
Runtime error 1004:
AutoFill method of Range class failed


Sub mac_fullmacro()
'
' mac_copyrawdata Macro

Dim uniquerow As Long
    Dim ws As Worksheet
    Set ws = ThisWorkbook.Sheets("Exported_Data")
    RowCount = ws.Range("A" & Rows.Count).End(xlUp).Row

Range("I2").AutoFill Destination:=Range("I2:L" & RowCount), Type:=xlFillSeries
Range("L2").AutoFill Destination:=Range("L2:L" & RowCount), Type:=xlFillSeries
Range("M2").AutoFill Destination:=Range("M2:M" & RowCount), Type:=xlFillSeries
Range("N2").AutoFill Destination:=Range("N2:N" & RowCount), Type:=xlFillSeries
Range("O2").AutoFill Destination:=Range("O2:O" & RowCount), Type:=xlFillSeries
Range("P2").AutoFill Destination:=Range("O2:O" & RowCount), Type:=xlFillSeries

End Sub

Open in new window


Can you help?
ASKER CERTIFIED SOLUTION
Avatar of Phillip Burton
Phillip Burton

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dabug80
dabug80

ASKER

Thanks. Such a silly typo to miss!