vba - Search a series of contiguous row cells in a worksheet -


search series of contiguous row cells in worksheet

    h1 h2 h3 h4 h5             h1 h2 h3 h4 h5     1  2  3  6  7              1  2  3  8  9     2  2  2  4  5              3  3  3  2  1     table 1                    table 2 

how code loop search first 3 cells in each row of table2, in table 1? given tables have same format.

range , cells dont seem work because cant use counter them

dim tlb1 range,tbl2 range dim rw1 range, rw2 range  set tbl1=range("your table1 range here") set tbl2=range("your table2 range here")  each rw1 in tbl1.rows     each rw2 in tbl2.rows         if rw1.cells(1)=rw2.cells(1) , rw1.cells(2)=rw2.cells(2) _            , rw1.cells(3)=rw2.cells(3)            'do whatever want on match...            'exit 'if want stop when find first match...         end if     next rw2 next rw1 

Comments

Popular posts from this blog

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

c# - Resource not found error -