hi experts
I want copying the whole rows contains mark "û" from sheet2 to result sheet , but should just copy wrong tick based on column C for sheet2
now I have this code but gives subsript out of range in this line
.AutoFilter.Range.Offset(1).Copy Sheets(v(i, 1)).Cells(Sheets(v(i, 1)).Rows.Count, "A").End(xlUp).Offset(1)
Sub CopyRows()
Application.ScreenUpdating = False
Dim v As Variant, i As Long, x As Long, srcWS As Worksheet
Set srcWS = Sheets("Sheet2")
v = srcWS.Range("C2", srcWS.Range("C" & srcWS.Rows.Count).End(xlUp)).Value
With CreateObject("scripting.dictionary")
For i = 1 To UBound(v)
If Not .Exists(v(i, 1)) Then
.Add v(i, 1), Nothing
With srcWS
If v(i, 1) = "û" And v(i, 1) < 0 Then
.Range("A2").CurrentRegion.AutoFilter 3, v(i, 1)
.AutoFilter.Range.Offset(1).Copy Sheets("result").Cells(Sheets("result").Rows.Count, "A").End(xlUp).Offset(1)
Else
.Range("A2").CurrentRegion.AutoFilter 3, v(i, 1)
.AutoFilter.Range.Offset(1).Copy Sheets(v(i, 1)).Cells(Sheets(v(i, 1)).Rows.Count, "A").End(xlUp).Offset(1)
End If
End With
End If
Next i
End With
srcWS.Range("A2").AutoFilter
Application.ScreenUpdating = True
End Sub