Hi,
The following code should eliminate the blank rows.
I or someone will get back to you with the copy range.
Sub XferData()
Application.ScreenUpdating = False
Dim lrow As Long, lc As Long, lr As Long
Dim myval As String
Dim i As Integer
Dim ws As Worksheet
For i = 1 To Sheets("all serch data").Cells(Rows.Count, 14).End(xlUp)
myval = Cells(i, 14).Text
For Each ws In ThisWorkbook.Worksheets
If ws.Name <> "all serch data" Then
If ws.Range("A1").Text = myval Then
lrow = Sheets("all serch data").Range("A65536").End(xlUp).Row + 4
If lrow > 4 Then
lrow = Sheets("all serch data").Range("A65536").End(xlUp).Row + 1
End If
Sheets(ws.Name).Activate
lr = Sheets(ws.Name).Range("A" & Rows.Count).End(xlUp).Offset(1, 0).Row
lc = Sheets(ws.Name).Range("IV3").End(xlToLeft).Offset(0, 1).Column
Sheets(ws.Name).Range(Cells(3, 1), Cells(lr, lc)).Copy Destination:=Sheets("all serch data").Range("A" & lrow)
Sheets("all serch data").Activate
Exit For
End If
End If
Next ws
Next i
Application.ScreenUpdating = True
End Sub
Bookmarks