With Below code : I have been getting an error
Runtime :6 "overflow.
it works till 18th rows absolutely in the manner I wanted. post that ... i goes to debug.
Please help.
Sub daily()
Dim i, Y, x As Long
Dim ws1 As Worksheet: Set ws1 = ActiveWorkbook.Sheets("RAW")
Dim ws2 As Worksheet: Set ws2 = ActiveWorkbook.Sheets("Report wise elapse summary")
Dim Ary1 As Range
Dim ary2 As Range
For x = 6 To 10000
Y = ws2.Cells(2, 3)
For i = 2 To 10000:
If ws1.Cells(i, 10) = Y Then
ws1.Activate
Set Ary1 = Range(Cells(i, 3), Cells(i, 13))
ws2.Activate
Set ary2 = Range(Cells(x, 2), Cells(x, 12))
ary2.Value = Ary1.Value
x = x + 1
End If
Next i
Next x
End Sub
Runtime :6 "overflow.
it works till 18th rows absolutely in the manner I wanted. post that ... i goes to debug.
Please help.
Sub daily()
Dim i, Y, x As Long
Dim ws1 As Worksheet: Set ws1 = ActiveWorkbook.Sheets("RAW")
Dim ws2 As Worksheet: Set ws2 = ActiveWorkbook.Sheets("Report wise elapse summary")
Dim Ary1 As Range
Dim ary2 As Range
For x = 6 To 10000
Y = ws2.Cells(2, 3)
For i = 2 To 10000:
If ws1.Cells(i, 10) = Y Then
ws1.Activate
Set Ary1 = Range(Cells(i, 3), Cells(i, 13))
ws2.Activate
Set ary2 = Range(Cells(x, 2), Cells(x, 12))
ary2.Value = Ary1.Value
x = x + 1
End If
Next i
Next x
End Sub