View Full Version : Solved: Extract specific data from a worksheet.

11-28-2007, 09:53 AM
Hi all,
I?m trying to extract data from ?import? worksheet and paste into ?PAPERLESS PICK2? worksheet. The data in the ?import? worksheet is from an imported text file. I need to pick out all the info under the title PAPERLESS PICK2, up until the first blank row.
The imported data varies and can be up to 20,000 rows and to make things worse the PAPERLESS PICK2 info is scattered all over.
I?ve attached my worksheet and highlighted the data to try and explain myself better. I?ve also copied and pasted the data into the PAPERLESS PICK2 worksheet to show my goal.
Any help anyone can give me would be greatly appreciated as I?ve spent half a day trying to figure it out.
Thank you,
Jazz Naura.

11-28-2007, 02:12 PM
Sub PP()
With Worksheets("import").Range("A:A")
Set c = .Find("PAPERLESS PICK2", LookIn:=xlValues)
If Not c Is Nothing Then
firstAddress = c.Address
Range(c, c.End(xlDown)).Resize(, 8).Copy Sheets("PAPERLESS PICK2").Cells(Rows.Count, 1).End(xlUp).Offset(2)
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address <> firstAddress
End If
End With
End Sub

11-29-2007, 09:49 AM
thanks mdmackillop worked a treat.

thanks again,

jazz naura