Solved

Excel Fill Down VBA Not Working

Posted on 2014-12-01
2
314 Views
Last Modified: 2014-12-01
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?
0
Comment
Question by:dabug80
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 24

Accepted Solution

by:
Phillip Burton earned 500 total points
ID: 40473411
Line 10 has "I2:L" - it should read "I2:I"
Line 15 has "O2:O" - it should read "P2:P"
0
 
LVL 1

Author Closing Comment

by:dabug80
ID: 40473436
Thanks. Such a silly typo to miss!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question