EXCEL. How do i find all the rows matching the values on a different row n a different file? -


i have 2 .xls files. 1 of files has column named "customer id" witch contains 700 8 digit values such 11557096. other file has column named "requested for" includes 2000 values customer id plus / name such 11557096 - john doe. find rows on second file match customer id's on "customer id" column on "requested for" column.

here simple filter example can start with.

the set up

set up

the code

sub button1_click()     dim rws long, rng range, filtrng range     rws = cells(rows.count, "a").end(xlup).row     set rng = range(cells(2, 1), cells(rws, 2))     application.screenupdating = 0     rng.autofilter 1, range("d1")     set filtrng = rng.offset(1)     filtrng.copy sheets("sheet2").cells(rows.count, "a").end(xlup).offset(1, 0)     activesheet.autofiltermode = 0 end sub 

the filter result filt result

paste next sheet.

enter image description here

the sample workbook

once have going can work on different sheets , different workbooks.


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -