PDA

View Full Version : multiple line search then copy to new sheet



pmuscat
03-15-2006, 11:04 AM
im new to VBA so i appolagise now for my ignorance. i have a html file that i imported into excell threw "New Web Querry". hte pages are allmost 1000 pages and i have to import part at a time.

my question is- i am trying to retreve the ADDRESS's from the data. and the only pattern i found is that there are 3 rows above the address that have no data. i would like to make a search macro to scan and when it finds 3 rows in a row with colum A = "" then it will copy the following 5 rows to another sheet. the name are not important because i just created it and are standard.

or if this makes it easier search for a phone number, 123-456-7890 in this format, and skip 3 rows and copy the next 5 rows
exe
~~~~~~~~~~~~~~
123-456-7890



name
title
company
street
town


~~~~~~~~~~~~~~~~~


i used (Delete Rows Based on Column Criteria) by brettdj (http://www.vbaexpress.com/forum/member.php?u=32). and was able to modify it to work with other data we need.

i have a decent understanding of the basics of VBA but havent programed in a few yrs, not since VB6.

all help is appreciated. thanks in advanced

matthewspatrick
03-15-2006, 05:30 PM
Can you upload a sample file?