Run_time error '1004' Application-defined or object-defined error

HockeyDiablo

Board Regular
Joined
Apr 1, 2016
Messages
182
This halfway works and I get the error around the 4,000 record mark.

Sub Row2Column()
Dim rngData As Range, r As Range, myDate As Date, strName As String
Application.ScreenUpdating = False
With Worksheets("Sheet0")
.Columns("A:B").Insert
Set rngData = .Columns("D").SpecialCells(2)
For Each r In rngData.Areas
myDate = r(1, 1).Value
strName = r(3, 1).Value
r.Offset(3, -3).Resize(r.Rows.Count - 3, 1).Value = strName
r.Offset(3, -2).Resize(r.Rows.Count - 3, 1).Value = myDate
Next r
.Columns("A:B").AutoFit
End With
Application.ScreenUpdating = True
End Sub


Here is what I am trying to accomplish: 05.31.2016-13.20.09 - JamesStruss7324's library

Thank you
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off

Forum statistics

Threads
1,223,164
Messages
6,170,444
Members
452,326
Latest member
johnshaji

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