Using Multiple filters in VBA || excel 2010 -


i new vba , need desperately. have excel file has 2 worksheets namely "urls" , "keywords". need macro can select keywords 1 one , apply them filters "urls" worksheet, in such manner in end have list of urls containing @ least 1 of keywords.

for instance if apply filter using first keyword "recipe", should get,

  • "simplyrecipes.com"
  • "simplerecipewizard.com"

after when apply second keyword "net", should have

  • "simplyrecipes.com"
  • "simplerecipewizard.com"
  • "topix.net"
  • "stockinvestingbasics.net"
  • "techdailynews.net"
  • "theanimeplace.net"
  • "seniorhousingnet.com"
  • "wordcounter.net" , on.

you can download excel file @ https://goo.gl/wrxnoe

thnx satdeep

filters not needed task:

sub gatherdata() '  http://stackoverflow.com/questions/30641317/using-multiple-filters-in-vba-excel-2010    dim s1 worksheet, s2 worksheet, v1 string, v2 string    dim n1 long, n2 long, long, j long, k long    set s1 = sheets("urls")    set s2 = sheets("keywords")     n1 = s1.cells(rows.count, 1).end(xlup).row    n2 = s2.cells(rows.count, 1).end(xlup).row    k = 1     j = 1 n2       v2 = s2.cells(j, 1).value       = 2 n1          v1 = s1.cells(i, 1).value          if instr(v1, v2) > 0             s1.cells(i, 1).copy s2.cells(k, 2)             k = k + 1          end if       next    next j end sub 

Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -