Question : FILTERING EXCEL DATA USING VALUES FROM 2ND WORKSHEET

I have an excel file that is a SEO report of a website. But the tool that generated the report included everything under the sun and most of it is junk. I want to filter out the important info such that I keep only records in the first worksheet that correspond to a record in a second worksheet.

Basically I want to keep all the records in the first sheet where the URL matches a URL in the "good url" list found on worksheet2.

Is there some cell formula I can use or macro or something???
Please explain how to implement the solution as it’s been a while since I used excel in any advanced way.

See the attached file for reference.

Thanks
Attachments:
 
sample fo my excel file in the question
 

Answer : FILTERING EXCEL DATA USING VALUES FROM 2ND WORKSHEET


sub remove_junk

dim c1 as range
dim c2 as range


for each c1 in sheet1.range(A:A)
     for each c2 in sheet2.range(A:A)
           if c1.value = c2.value then
                  goto found
           end if
     next
c1.delete
found:
next

end sub

You could use something like this

Random Solutions  
 
programming4us programming4us