-
Solved: Extract specific data from a worksheet.
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.
-
[VBA]
Sub PP()
With Worksheets("import").Range("A:A")
Set c = .Find("PAPERLESS PICK2", LookIn:=xlValues)
If Not c Is Nothing Then
firstAddress = c.Address
Do
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
[/VBA]
MVP (Excel 2008-2010)
Post a workbook with sample data and layout if you want a quicker solution.
To help indent your macros try Smart Indent
Please remember to mark threads 'Solved'
-
thanks mdmackillop worked a treat.
thanks again,
jazz naura
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules