0
1
So I was trying to copy data from different sheet and paste on current and I am getting this error:
"Application Defined or Object Defined" error '1004"
Can someone help me with this ?
Option Explicit
Sub finddata()
Dim fname As String
Dim FinalRow As Long
Dim i As Integer
Sheets("Report").Range("A10:N200").ClearContents
fname = Sheets("Report").Range("A4").Value
FinalRow = Sheets("Database").Range("A1000").End(xlUp).Row
For i = 3 To FinalRow
If Sheets("Database").Cells(i, 1) = fname Then
Sheets("Database").Range(Cells(i, 11), Cells(i, 24)).Copy ----> Getting "Application Defined or Object Defined" error '1004" on this line
Sheets("Report").Range("A1000").End(xlUp).Offset(1, 0).PasteSpecial xlPasteFormulasAndNumberFormats
End If
Next i
End Sub
Can you troubleshoot and tell me the right solution ? – AriKari – 2015-08-25T10:01:47.767
When I ran it first time it works perfectly second time it gives an error. – AriKari – 2015-08-25T10:02:40.070
Hey it worked perfectly thank you very much Sir. – AriKari – 2015-08-25T10:04:23.930