excel vba use command if -


i have 2 excel files (file 1 sheet 1 , file 2 sheet 2). both have inside, in column names (for example in a1: "a", in a2: "b" etc etc), in column b values of relative lenghts (for example in b1: "2", in b2: "3" etc etc) orders of things in 2 sheets different; so, want say: "if name in cell in column of sheet 1 same of name in cell in column of sheet 2, compare relative values in column b , write true in column c of 1 of sheet (if values identical) or false" possible? me, please? in advance

if sheet1 has

a    5 b    6 c    7 d    8 

and sheet2 has

c    3 d    8    5 

then can type

=iferror(if(b1=indirect("sheet2!b"&match(a1,sheet2!a$1:a$4,0)),"match found",""),"") 

into cell c1 of sheet1 , drag fill handle down , get

match found   match found 

in column c of sheet1. no vba needed. :)

note: since second sheet in separate file, you'll want change sheet2 [file2.xlsx]sheet1 in cell c1.


Comments

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -