AutoFill Code Problems - Can you help

CoraG

New Member
Joined
Aug 30, 2018
Messages
31
Worksheets("QTR1").Activate

Range("B6").Copy
Sheets("QTR1").Paste Destination:=Sheets("IMPROPER DETAIL").Cells(erow, 1)
Application.CutCopyMode = False

ActiveCell.AutoFill Range(ActiveCell.ActiveCell.Offset(0, 1).End(xlDown).Offset(0, -1))

I keep getting the error, '438' Object doesn't support this property or method!
 
Last edited:

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
This line does not look structured properly:
Code:
[COLOR=#333333]Sheets("QTR1").Paste Destination:=Sheets("IMPROPER DETAIL").Cells(erow, 1)[/COLOR]
Which sheet are you trying to paste to? "QTR1" or "IMPROPER DETAIL"?
Not sure why you have two different sheet references on that paste line.
 
Upvote 0
What range are you trying to autofill here?
Code:
ActiveCell.AutoFill Range(ActiveCell.ActiveCell.Offset(0, 1).End(xlDown).Offset(0, -1))
ActiveCell doesn't have an ActiveCell property.
 
Upvote 0
Column A but I am having problems where my code isn't finding the next empty row to paste in column A & B now...

Dim LastRow As Long
LastRow = Sheets("IMPROPER DETAIL").Cells(Rows.Count, 1).End(xlUp).Offset(1, 1).Row
Dim IPrange As Range
Set IPrange = ActiveSheet.Range("A:A")
Dim erow As Long
erow = Sheets("IMPROPER DETAIL").Cells(Rows.Count, 2).End(xlUp).Offset(1, 0).Row
Dim erowb As Long
erowb = Sheets("IMPROPER DETAIL").Cells(Rows.Count, 4).End(xlUp).Offset(1, 0).Row
Dim erowc As Long
erowc = Sheets("IMPROPER DETAIL").Cells(Rows.Count, 5).End(xlUp).Offset(1, 0).Row
Do Until IP = ""
Worksheets("QTR1").Activate
Range("C20").Select
ActiveCell.Offset(0, 0).Select
Range(Selection, Selection.End(xlDown)).Copy
Sheets("QTR1").Paste Destination:=Sheets("IMPROPER DETAIL").Cells(erow, 2)
Application.CutCopyMode = False
Worksheets("QTR1").Activate
Range("D20").Select
ActiveCell.Offset(0, 0).Select
Range(Selection, Selection.End(xlDown)).Copy
Sheets("QTR1").Paste Destination:=Sheets("IMPROPER DETAIL").Cells(erowb, 4)
Application.CutCopyMode = False
Worksheets("QTR1").Activate
Range("E20").Select
ActiveCell.Offset(0, 0).Select
Range(Selection, Selection.End(xlDown)).Copy
Sheets("QTR1").Paste Destination:=Sheets("IMPROPER DETAIL").Cells(erowc, 5)
Application.CutCopyMode = False
Worksheets("QTR1").Activate
Range("B6").Copy
Sheets("QTR1").Paste Destination:=Sheets("IMPROPER DETAIL").Cells(erow, 1)
Application.CutCopyMode = False
Range("A6").Select
ActiveCell.AutoFill Range(ActiveCell, ActiveCell.Offset(0, 1).End(xlDown).Offset(0, -1)), Type:=xlFillCopy
Range("A6").Select
Worksheets("QTR2").Activate
Range("C20").Select
ActiveCell.Offset(0, 0).Select
Range(Selection, Selection.End(xlDown)).Copy
Sheets("QTR2").Paste Destination:=Sheets("IMPROPER DETAIL").Cells(erow, 2)
Application.CutCopyMode = False
Worksheets("QTR2").Activate
Range("D20").Select
ActiveCell.Offset(0, 0).Select
Range(Selection, Selection.End(xlDown)).Copy
Sheets("QTR2").Paste Destination:=Sheets("IMPROPER DETAIL").Cells(erowb, 4)
Application.CutCopyMode = False
Worksheets("QTR2").Activate
Range("E20").Select
ActiveCell.Offset(0, 0).Select
Range(Selection, Selection.End(xlDown)).Copy
Sheets("QTR2").Paste Destination:=Sheets("IMPROPER DETAIL").Cells(erowc, 5)
Application.CutCopyMode = False
Worksheets("QTR2").Activate
Range("B6").Copy
Sheets("QTR2").Paste Destination:=Sheets("IMPROPER DETAIL").Cells(erow, 1)
Application.CutCopyMode = False
ActiveSheet.Cells(erow, 1).Select
ActiveCell.AutoFill Range(ActiveCell, ActiveCell.Offset(0, 1).End(xlDown).Offset(0, -1)), Type:=xlFillCopy
Range("A6").Select
Loop
End Sub

<colgroup><col style="width:48pt" width="64"> </colgroup><tbody>
[TD="width: 64"]Sub UpdateQTR()[/TD]

</tbody>
 
Last edited:
Upvote 0
Disregard the code... that is a different issue... I tried it but it gives me Object doesn't support this property or method.
 
Upvote 0
I tried it with a comma and I get something about merged cells having to be the same size but my sells are not merged. ActiveCell.AutoFill Range(ActiveCell, ActiveCell.Offset(0, 1).End(xlDown).Offset(0, -1)), Type:=xlFillCopy If I go back up to a couple of steps (F8) to check the code it works but on its own F5 it won't
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,175
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top