Dear friends,
I have below code working perfect to extract data to many sheets filtering by coloumn E, it is extracting starting fromB2, i want it start from B5, i am unable to trigger where to change the code any help please....
Regards
Hanim
I have below code working perfect to extract data to many sheets filtering by coloumn E, it is extracting starting fromB2, i want it start from B5, i am unable to trigger where to change the code any help please....
Code:
Sub extract
Dim sh As Worksheet, sh1 As Worksheet
Dim r As Range, cell As Range, r1 As Range
Set sh = Worksheets("Paste Segment")
Set r = sh.Range("E5:E3000")
For Each cell In r
If Len(Trim(cell.Value)) > 0 Then
Set sh1 = Nothing
On Error Resume Next
Set sh1 = Worksheets(cell.Text)
On Error GoTo 0
If Not sh1 Is Nothing Then
Set r1 = sh.Range(sh.Cells(cell.Row, "B"), sh.Cells(cell.Row, "Q"))
r1.Copy sh1.Cells(sh1.Rows.Count, "B").End(xlUp).Offset(1, 0)
End If
End If
Next
End sub
Regards
Hanim